A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

modify an existing field



 
 
Thread Tools Display Modes
  #1  
Old August 30th, 2006, 05:57 PM posted to microsoft.public.access.forms
babs
external usenet poster
 
Posts: 409
Default modify an existing field

I have a field called grosswt(it is in tons). Currently it is a field that
the user puts into a Form based off of a query.(which obviously is based off
a table). I have about 7 different reports all based off of different
queries but the same table.

On an INPUT form- I need to modify the gross weight field that if we are
given lbs then take the pound amount and divide it by 2000 to get the
grosswt(in tons). I really do not want to change the grosswt field at all
since there are so many reports and queries that use this field. I would
have to modify 6-8 queries and hope I get them all. Is there anyway I can
handle is pound(lb) situation and leave the grosswt. field in tact.

Thought of If then where if pound field is 0 grossweight = grossweight
If pound field not null than grosswt=lb/2000
If I do this then I will have to change all the queries

Thanks,
Barb
  #2  
Old August 30th, 2006, 09:01 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default modify an existing field

If you are saying that you have one control on your form that the user can
input the weight either in tons or pound, but you want it stored in the table
as pounds, then I would suggest you put a small command button on the form
just to the right of the grosswt text box that will do the conversion for
you. In the click event:

Me.grosswt = me.grosswt / 2000

For safety sake, I would disable the button for existing records and only
enable it for new records. Do that in the form Current event:

Me.cmdConvert.Enabled = Me.NewRecord

"babs" wrote:

I have a field called grosswt(it is in tons). Currently it is a field that
the user puts into a Form based off of a query.(which obviously is based off
a table). I have about 7 different reports all based off of different
queries but the same table.

On an INPUT form- I need to modify the gross weight field that if we are
given lbs then take the pound amount and divide it by 2000 to get the
grosswt(in tons). I really do not want to change the grosswt field at all
since there are so many reports and queries that use this field. I would
have to modify 6-8 queries and hope I get them all. Is there anyway I can
handle is pound(lb) situation and leave the grosswt. field in tact.

Thought of If then where if pound field is 0 grossweight = grossweight
If pound field not null than grosswt=lb/2000
If I do this then I will have to change all the queries

Thanks,
Barb

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.