Putting a new value into a bound form from a table

ismith

Registered User.
Local time
Today, 15:30
Joined
Dec 14, 2011
Messages
30
Ive got a bound form which displays the last record that has been entered in the database.

this shows the details: ProductID, Desc, quantity, size, price etc..

i done it using:

Forms!frmProduct.Recordset.FindFirst "ProductID = " & DMax("ProductID", "tblProduct")

Now on another form what i want to do is show the next Number in the ProductID that a product will be entered on.

So an example could be that the last ID in my form is 82 which has a spanner.

So when a user goes to add another product,
Ive got a bound ProductID box which i want to display 83 because thats were the next item will be added.

How could i do this?

Thanks..
 
Is the data type of ProductID not AutoNumber? Do you know what AutoNumber does?
 
yes it is autonumber.

It increments the field.
 
So what is the question? If you add a new record the number 82 goes up by 1 making it 83.
 
Ye but when i put the bound form for the Product ID in,
then put the code you gave me, it keeps it at 82, which would then overwrite my info already on ProductID '82'.

So how do i make it change to 83..

Thanks.
 
Like I mentioned, when you move to a new record the number increments.
 

Users who are viewing this thread

Back
Top Bottom