cmd button that increments numbers

nooner

Registered User.
Local time
Today, 20:02
Joined
Feb 27, 2003
Messages
11
I have an issues form that records project issues, I want to add a command button that will add an issue number; once pressed that will automatically increment the last issue entered ie: if the last issue entered was 1 and then when I press the button issue number 2 will appear in the issue id text field.I am new to VBA and wondering is this possible, thank you in advance for any suggestions you may give.
 
The user requested a command button and I allready have an autonumber to track the project id, unfortuneatley a command button is needed; can it be done, thank you for your response.
 
you could use your existing table that holds your
issue number,then disable the command button
once the number has been added

you would also need to have the command button disabled
for all records except new ones



use the on click event for your command button

me![the name of the text box that holds issue no]=DMax("[issue number]","[your table name]")+1

me![the name of the text box that holds issue no].setfocus

me![command button name].enabled=false
 

Users who are viewing this thread

Back
Top Bottom