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
|
|||
|
|||
Quote Form With Options - Repost
It seems my original thread of 4/29/10 "Quote Form with Options" has been forgotten. Tom van Stiphout was helping and gave me the instructions for a button to ""Create New Option". It would look at the maximum option used so far (DMax function) and add 1 to it. When the button is clicked, you save the JobNumber information and perhaps some other key information, go to a new record, populate the JobNumber with the saved value, and set the Option field to whatever DMax(...)+1 returns." I have researched and tried several methods of code, but can't seem to get anything to work other than the option field increasing in number. This is currently what I have which throws an error message "can't go to specified record" and highlights the GoToRecord,,acNewRec line. I think it has something to do with the job number, but can't figure out how to correct it. Private Sub LblQuoteOptions_Click() DoCmd.RunCommand acCmdSave DoCmd.GoToRecord , , acNewRec Me.JobNumber.DefaultValue = """" & Me.JobNumber.Value & """" Me.Option = Nz(DMax("Option", "tquotemainform"), 0) + 1 End Sub Any suggestions would be greatly appreciated. Thank in advance, Pam |
Thread Tools | |
Display Modes | |
|
|