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.

Recommended Answers

All 3 Replies

Use the Format function

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

Good Luck

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

ive already try it sir.Thank you very much.

The problem now solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.