nalym
May 25 2005, 07:19 AM
HI!! I got in this morning and opened up my database. When the form where the M5250001 comes up the first time...in that space it gives an error message. Then when I close it and open it up on my own it works. Do you know why?
ScottGem
May 25 2005, 08:30 AM
You probably aren't using Nz function as we told you so the first record of the day returns a Null which causes the error.
nalym
May 25 2005, 10:02 AM
This is in the txtPrefix:
="M" & Format(Date(),"mdd")
This is in the txtIncrement:
=nz(DMax("[Increment]","InputTable","[Prefix] = '" & "M" & Format(Date(),"mdd") & "'"),0)+1
I have a form(switchboard) that comes up first....then the form to input (where the number is displayed) can be choosen. Do you think if I put the txtPrefic and txtIncrement on the first one then call it from the second one...then it will work?
ScottGem
May 25 2005, 10:33 AM
The Switchboard should be a navigation form. You want this on the form where you enter new records only. What control is showing the error?
nalym
May 25 2005, 02:36 PM
it won't so it now...I think it only does it the first time of each new day
ScottGem
May 25 2005, 02:43 PM
If it only happens on first time then txtIncrement is returning a null
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.