latex88
Registered User.
- Local time
- Today, 10:26
- Joined
- Jul 10, 2003
- Messages
- 198
This seems easy enough, but I'm not sure why when I test it in the Immediate window, I get value of 0, when I know it should return something like 386.
Basically, I want to set A public variable to reflect the highest ID (OrderID is the field name) in TABLE, tblOrderID. My code is below.
Public Function ID_lookup()
LastID = DMax("OrderID", "tblOrderID")
End Function
When I test it, it returns 0. See below. What am I doing wrong?
Immediate
___________________________________________________________
? LastID
0
Basically, I want to set A public variable to reflect the highest ID (OrderID is the field name) in TABLE, tblOrderID. My code is below.
Public Function ID_lookup()
LastID = DMax("OrderID", "tblOrderID")
End Function
When I test it, it returns 0. See below. What am I doing wrong?
Immediate
___________________________________________________________
? LastID
0