UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> CODE Help    
 
   
Goof2767
post Jun 1 2009, 07:37 AM
Post #1

UtterAccess Addict
Posts: 156
From: Pennsylvania, USA



I have the following code:

If Me.[FYStartDate] >= #6/1/2009# Then
Me.txtJobNum = Nz(DMax("JobNum", "tblDetail", "[FYStartDate]>=#6/1/2009#"), "0000") + 1

When the controll this is tied to is populated, it shows a single digit("1", "2" and so on). How can I get it to show four places i.e. "0001", "0002" and so on.
Go to the top of the page
 
+
dashiellx2000
post Jun 1 2009, 07:49 AM
Post #2

UtterAccess VIP
Posts: 9,209
From: Maryland



You need to set the imput mask property on the control on the form to 0000

HTH.
Go to the top of the page
 
+
Goof2767
post Jun 1 2009, 07:54 AM
Post #3

UtterAccess Addict
Posts: 156
From: Pennsylvania, USA



Thanks for the help!!!!
Go to the top of the page
 
+
missinglinq
post Jun 1 2009, 08:46 AM
Post #4

UtterAccess Ruler
Posts: 2,659



I believe William meant to say put the 0000 in the Format Property of the textbox, not the Input Mask.
Go to the top of the page
 
+
Goof2767
post Jun 1 2009, 10:01 AM
Post #5

UtterAccess Addict
Posts: 156
From: Pennsylvania, USA



Thanks missing...that worked a little better!!
Go to the top of the page
 
+
JVanKirk
post Jun 1 2009, 11:12 AM
Post #6

UtterAccess VIP
Posts: 3,872
From: Fort Drum, NY



I think?? you could also just use:

Me.txtJobNum = Format( Nz(DMax("JobNum", "tblDetail", "[FYStartDate]>=#6/1/2009#"), "0000") + 1) , "0000")
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 06:32 PM