Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EDITING A FIELD IN A SUBFORM!!!!!!!!!

Status
Not open for further replies.

legs00

Programmer
Oct 17, 2001
36
0
0
CA
Hi,

I have this subform that is based on a recordsource, and the user can make modifications. My problem is, I have to make a validation using the combo box before and changes are made to the table!! What I want to do is keep in memory the initial value in the combo boxes of each record so when the user changes the value of the combo box, my validations will work properly!!!!!
Please can someone help me!

Thanks,
Legs
 
How about putting an invisible text box on your subform. In the before update event of the combo box populate this text box with the initial value of the combo. Then in the afterupdate event you can refer to the text box to run your validation code.

Does this help?

Nigel
 
Hi Legs!

Access already stores this information until the record is actually updated. In the BeforeUpdate event of the supform you can use Me!MyComboBox.OldValue to access what had been in the combo box and use it for validation. You will need to do the validation prior to leaving the subform because the changes will be made in the table by then. If for some reason you absolutely must wait to do the validation then Nigel is right, you must store the information in a textbox somewhere.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top