Store Value

Taff

Registered User.
Local time
Today, 18:02
Joined
Feb 3, 2004
Messages
158
Hi all,

I have a form with an unbound text box and when I click a command button a value is passed to this text box. Problem is that when I close and reopen my form the value is gone.

Is it possible to store this value in the unbound text box so it stays stored until changed via use of the command button.

Thanks

Anthony
 
No. You're probably doing something the hard way, anyway. :D

Why are you trying to do this?
 
Hi Mile-O-Phile,

Basically i need to know the last record added. I do this my recording the SubmissionNo field to the unbound text box. This way there is no way they can delete any previous records as the last record added submission number would be stored in the unbound text box.

However i cant get the value to be stored in the unbound text box.

Not sure if you can make sense of what I'm saying? :confused:

I know what I mean but I cant put it into words. :D

Ant
 
Is this a numerical ID? An autonumber? If so, you can use the DMax() function within it's ControlSource to return the last one added.

Another suggestion is to have a field in your tabled (DateCreated) which you can then use to get what you want from the previous record. I'd go with the first, though.
 
Thanks Mile-O-Phile,

If i use the DMAX function will it effect the outcome if a record is deleted?

Ant
 
If you use the DMax function in the ControlSource of a textbox (remember to Disable it) then it won't affect anything.
 

Users who are viewing this thread

Back
Top Bottom