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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loosing variable contents when tabbing through form

Status
Not open for further replies.

yauncin

Programmer
Dec 18, 2001
212
US
I have looked around quite a bit but I haven't been able to find an answer to my delimma. If anyone can help me, I would greatly appreciate it.

I am using Access 2000 on Windows 98.
In my record source one of the many fields I call is contract_id, which is a primary key to one of the tables in the record source. In the Form_Current() event procedure I initialize it to a unique number. Now when I open the form and tab through entering data, certain form fields will clear contract_id (that is it initializes to 0) after information is entered. The reason I know this is because I created a little button that shows the value of content_id. Also, its not a particular type of form field - a combo box will do it and a text box will do it, but not all of a particular type. Has anyone else come across this problem or have any ideas.

TIA,
yauncin
 
Why not let Access create the primary key? If you need a unique ID of a particular form you can generate that at a different stage, perhaps on saving the record.

al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top