Discussion Locked

Access 97 form troubles

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

In a form, in 'add mode' I want a bound text box to have a default value as follows:

Max[textField]+1

textField contains only numbers.
Add mode doesn't cycle records(for me anyway.
If the value is obtained from another form, default value isset before the other form has finished calculating.
A 'set value' macro doesn't want to work on my 'bound' text box.
textField has values from another form also, can't be auto number.
Database tables are in a MDE from the previous programmer who has conveniently lost all source code and we need to make a whole new dbase system for the changes we're incorporating.
This form will determine the next 'job number' and allow manipulation of accounts to describe what the jobNum is.

4 replies

by rraheb

I don't think I fully understand your problem, but as far as I understand I guess you can put this calculated value as the default value for this field in the form. You'll find this in the text box properties.

Then you can either allow the userto edit this default value or not by setting the locked property to either no or yes.

Hope this is helpful...

Contact me for clarifications...

-Rafik

by spammy

If I understand your message correctly, it looks like what you need is a Domain Aggregate function, like this:

=DMax("[FieldName]","TableName")+1

Add that bit of code to your default property and you should get what you want every time.

Good luck!

-Dori Horn
DazzTec Computer Control

This discussion is closed to new replies.