Good day!

Im so confused of auto incrementing a receipt number format.

example i have a starting receipt no. (00000) in a mysql field called or no.

when the paymentfrm load, the textbox that contains the receipt no will be added by one so that it will become 00001. I try this by getting the last used receipt no, but when i add 1 into it wil not become 00001 bu the result is 1. whats wrong with this. Please help. Im using mysql as my back-end database.

txtreceitno=rs.fields("orno") + 1

Whats wrong with my code.?

God bless on this mother earth.

Use the Format function

txtreceitno = Format(rs.fields("orno") + 1, "00000")

Good Luck

thank you sir. Ill try this format function and i will immediately till you the result.

Thank you so much for giving me time

This question has already been answered. Start a new discussion instead.