hugomadail
Registered User.
- Local time
- Today, 15:05
- Joined
- Aug 31, 2018
- Messages
- 25
Hello,
I have a form (frmClients) on which i'm trying to update a field using a button on click event, with the vba code:
Me.[Number] = Nz(DMax("[Number]", "QryClientsExt", "[LocationID] = " & [VarTemp]![Location] & " And [WorkplaceID] = " & Forms("frmClients").Workplace.Column(1)), 0) + 1
The idea is to add number to [Number] field on the button press, with both criteria (so incremental number will be different while checking both criteria)
adicional info: [Number] is a number field
When pressing the button, i get error 2465 cannot locate field '|1'
What am I doing wrong?
I have a form (frmClients) on which i'm trying to update a field using a button on click event, with the vba code:
Me.[Number] = Nz(DMax("[Number]", "QryClientsExt", "[LocationID] = " & [VarTemp]![Location] & " And [WorkplaceID] = " & Forms("frmClients").Workplace.Column(1)), 0) + 1
The idea is to add number to [Number] field on the button press, with both criteria (so incremental number will be different while checking both criteria)
adicional info: [Number] is a number field
When pressing the button, i get error 2465 cannot locate field '|1'
What am I doing wrong?