View Single Post
  #3  
Old May 10th, 2010, 03:37 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Quote Form With Options - Repost

PHisaw,
It appears as though you also had a new "re-post" dealing with this
issue
on April 30th @ 3:17PM
"Multiple quotes for same job number using option buttons"
John Vinson replied to that... with no reply from you, as yet.

Please be sure your up to snuff on all your replies... and... if this is
another post dealing with primarily the same issue... please
return to any old ones, and let folks know that you're re-posting.
Thanks...
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"PHisaw" wrote in message
...

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