My Assistant
![]() ![]() |
|
|
May 25 2005, 07:19 AM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 59 |
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?
|
|
|
|
May 25 2005, 08:30 AM
Post
#2
|
|
|
UtterAccess VIP / UA Clown Posts: 25,021 From: LI, NY |
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.
|
|
|
|
May 25 2005, 10:02 AM
Post
#3
|
|
|
UtterAccess Enthusiast Posts: 59 |
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? |
|
|
|
May 25 2005, 10:33 AM
Post
#4
|
|
|
UtterAccess VIP / UA Clown Posts: 25,021 From: LI, NY |
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?
|
|
|
|
May 25 2005, 02:36 PM
Post
#5
|
|
|
UtterAccess Enthusiast Posts: 59 |
it won't so it now...I think it only does it the first time of each new day
|
|
|
|
May 25 2005, 02:43 PM
Post
#6
|
|
|
UtterAccess VIP / UA Clown Posts: 25,021 From: LI, NY |
If it only happens on first time then txtIncrement is returning a null
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 07:25 PM |