A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Quote Form With Options - Repost



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old May 10th, 2010, 03:01 PM posted to microsoft.public.access.forms
PHisaw
external usenet poster
 
Posts: 224
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.