refernece number missing digit during form transfer

the problem is selective..

if you choose a date from the month october to december.. it works fine..

october - 10th month
nov 11th
dec 12th

the month has a two digit value..

anything from september and before.. 9th month.. 8th month...

it is for these dates that the '0' is left out.. does that provide any other clues??
 
Hey, I totally apologize - I found the actual spot where it doesn't work. It is if you open any other form after the main form. I'm trying to play with it to come up with a fix.
 
I look forward to seeing the fix - I have not been able to find out what is casuing the problem although I feel there is some formatting issue somewhere.
 
It may take me some time as I am at work for the next 7½ hours and then I might be able to work on it later tonight at home. If someone else comes up with the answer before then, then I won't have to, but if not I will attempt it.
 
thanks.. im sure its not a huge problem.. i just cant seem to get it working..if anyone else could download the sample database and give it a go i would be most grateful.
 
Still got 2 hours at work. Like I said, this one will take a lot of work and I'm not able to devote myself to it until after work.
 
mate.. you know i completely understand.. the creator of the forum rests happilly in his grave...

whenever you can give me any help its fine.. thanks for the reply
 
Okay, I have a fix for you.

First, change these lines from this:
Code:
DoCmd.OpenForm "job_cash_inflight", , , "[jobref]='" & [jobref] & "'"

To this:
Code:
DoCmd.OpenForm "job_cash_inflight"

And then change this:
Code:
Private Sub Form_Open(Cancel As Integer)
Me.[jobref].DefaultValue = Forms!job_cash_single![jobref]
End Sub

To this:
Code:
Me.txtjobref.SetFocus
Me.txtjobref = Format(Forms!job_cash_single.jobref, "00000000")
Me.cbomg.SetFocus

and then change it for the other form too.

I hope that helps!
 

Users who are viewing this thread

Back
Top Bottom