How to get last entered value in text box

hrdpgajjar

Registered User.
Local time
Today, 10:06
Joined
Sep 24, 2019
Messages
133
Hi,
I've a table named inward & a column named inward number

Now, For each time I enter inward number manually. So I want to know what was the last inward number I've entered in a Separate text box to avoid duplicate entry.

- I've tried "DLookup" & DLast query functions but no luck.


kindly help me how can i do that


Thanks
 
Hi. I usually use DCount(). Can you show us your code?
 
Assuming the numbers always increase, just populate it using
Code:
Me.txtLastInwardNumber=DMax("InwardNumber", "YourTableName")

Or if you can't rely on DMax, save the last entered value as a variable and retrieve the variable value for your textbox.

Of course a simpler system would be to use an auto number for the field!
 
Assuming the numbers always increase, just populate it using
Code:
Me.txtLastInwardNumber=DMax("InwardNumber", "YourTableName")

Or if you can't rely on DMax, save the last entered value as a variable and retrieve the variable value for your textbox.

Of course a simpler system would be to use an auto number for the field!

Thanks

works like a charm!!! :)
 
You're welcome.
Which method did you use?
 

Users who are viewing this thread

Back
Top Bottom