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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|