G
Guest
I have a value that should be incrementing automatically (from a query) when
a form opens. However, the new value is not populating the table. So when I
go to open an new form, I am not getting a new incremented value.
Here is my code.
Private Sub Form_Open(Cancel As Integer)
txt_Contract_Main_No = 1 + Nz(DMax("Contract_Main_No",
"Qry_Int_Contracts_Main"), 0)
End Sub
The reason I have it looking to the query for the next number is because I
have two ranges of numbers and instead of having two separate tables, I
thought I would just run a query for each set of number and have my form
based off of each query (just in case that was important to figuring out this
problem).
Is there something else I need to do to get the new incremented number to
populate my table?
As always, any help is appreciated.
a form opens. However, the new value is not populating the table. So when I
go to open an new form, I am not getting a new incremented value.
Here is my code.
Private Sub Form_Open(Cancel As Integer)
txt_Contract_Main_No = 1 + Nz(DMax("Contract_Main_No",
"Qry_Int_Contracts_Main"), 0)
End Sub
The reason I have it looking to the query for the next number is because I
have two ranges of numbers and instead of having two separate tables, I
thought I would just run a query for each set of number and have my form
based off of each query (just in case that was important to figuring out this
problem).
Is there something else I need to do to get the new incremented number to
populate my table?
As always, any help is appreciated.