Auto Fill a Textbox in Form

  • Thread starter Thread starter CCHD via AccessMonster.com
  • Start date Start date
C

CCHD via AccessMonster.com

What is the simplest way to auto fill a textbox (in a form) with the maximum
values of more than one field in the last record entered, in the same table?

Can the =DMax function be used for this?

I have tried =DMax(“[field_1]â€, “[field_2]â€, “[field_3]†, “table_1â€)+1, but
this doesn’t work.

Is something like this possible with two or more feilds with DMax?

Thanks
 
What do you mean, "No luck"?

Did it compile? (Compile on Debug menu, in the code window.)

Did you test it from the Immediate Window (Ctrl+G) with a few literal
values, e.g.:
? MaxOfList(4, 7, -11, 9, 2)

What is the data type of the fields you are passing in?

In what context did you use it? Code? Text box? Query field?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CCHD via AccessMonster.com said:
I followed the instructions provided by your link, but no luck!


Allen said:
See MinOfList() and MaxOfList() here:
http://allenbrowne.com/func-09.html
What is the simplest way to auto fill a textbox (in a form) with the
maximum
[quoted text clipped - 8 lines]
Is something like this possible with two or more feilds with DMax?
 
Back
Top