Results 1 to 2 of 2
Thread: Setting a Variable (Access 2002)
2004-02-27, 22:50 #1
- Join Date
- Feb 2010
- Denver, CO
- Thanked 0 Times in 0 Posts
Setting a Variable (Access 2002)
This is probably one of those that I should know off the top of my head-
I have a table whose PK is an autonum that just counts up. I need to be able to set a variable to the highest number in this field. I've tried several different ways, but keep <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15> .
I've written a make-table query to keep a one-record, one-row table up to date, bit can't figure out how to set a variable equal to it.
<font color=red>TMI Warning==></font color=red> AND in case I'm just going about this ALL WRONG, here's what I'm trying to accomplish: I have a form that lists item numbers based on a selection from a combobox. I'm adding functionality to add another choice to the combobox. Accomplished that without problems. But I want the form to automatically show the items from the newly created choice. (Yes, it will be blank, but that's OK).
2004-02-27, 22:59 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Setting a Variable (Access 2002)
DMax("PK_Name", "Table_Name") will return the maximum value of the field named PK_Name in the table named Table_Name.