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

displaying default values on form

Status
Not open for further replies.

elff

Technical User
Oct 26, 2003
12
US
I have a table that has a field, &quot;sequence&quot; that is the key and an auto number. A second field, &quot;PONumber&quot; needs to default to the value of &quot;sequence&quot;, but be editable so the user can override if needed. My first problem is when I add a new record, &quot;sequence&quot; displays <autovalue> or something like that and does not display the number until I enter something in another field. The second problem, which I'm guessing is related, is that the &quot;PONumber&quot; doesn't seem to get set to the value of &quot;sequence&quot; because it &quot;sequence&quot; doesn't have a value until something is entered in a different field. I would like for the user to select a button control for &quot;Add record&quot; and see the screen come up with the sequence number and PONumber filled in (to same value) and the first tab stop be the PONumber which they can tab through or edit as appropriate. Any suggestions would be appreciated.
 
Hi

This is how Autonumber fields behave.

You could work around the problem, by populating a control in code, but I suppose the real question is why have two columns with the same value ? maybe you need to expand on what you are trying to do and why

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
The reason for the two fields is that most of the time PONumber will just be the next number in sequential order but sometimes the customer may need to change that to some other value. So the thought was to have a key field that incremented and a second field that was set to same value but was user editable so they could change it if needed. It certainly could be done with one field if there's a way to accomplish the goal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top