Need urgent help

E

ernie

Hi all i need help using 'Format'. when ever i use format in my codes example
below:

Me.Lodgement_No = Format(fpart + 1, "000") & "/" & Format(daynoW, "00")

If i try searching in the field for the string created, it dont come up in
my search even if its there. the input mask in the search field is 999/99. if
i change the input mask in the search field to 000/00, i will find the
previously entered records but not the records that was generated by the code
above.

and when i change the format above to:

Me.Lodgement_No = Format(fpart + 1, "999") & "/" & Format(daynoW, "99")

it doesnt create the next reference number. instead it puts in the field
"999/99"

How can i solve this problem.

I need help
Thanks in Advance
Ernie
 
M

Marshall Barton

ernie said:
Hi all i need help using 'Format'. when ever i use format in my codes example
below:

Me.Lodgement_No = Format(fpart + 1, "000") & "/" & Format(daynoW, "00")

If i try searching in the field for the string created, it dont come up in
my search even if its there. the input mask in the search field is 999/99. if
i change the input mask in the search field to 000/00, i will find the
previously entered records but not the records that was generated by the code
above.

and when i change the format above to:

Me.Lodgement_No = Format(fpart + 1, "999") & "/" & Format(daynoW, "99")

it doesnt create the next reference number. instead it puts in the field
"999/99"


9 is not a valid format code character so it is just
returning the character 9.

I think you want:
Format(fpart + 1, "000") & "/" & Format(daynoW, "00")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top