V
Veus
Hi,
I have to run an update query when a user deletes a record in a subform
of another form.
The query itself is:
UPDATE crmcontactdetails SET primary = 1 WHERE
crmcontactdetails.primaryFirmID= " & Me.primaryFirmID & " AND
crmcontactdetails.type= '" & Me.type & "' LIMIT 1
Now it works without the LIMIT 1 in it, however i need it there as it
will return multiple rows and i only want to update the first one it
finds.
The theory behind this query is that if a user deletes a contact for a
primaryfirm which is the primary contact for that type i need to set a
new primary contact that way every primaryfirm and type combo will have
a primary contact.
Ive tried the same query in mysql directly and it works, is there any
restrictions in access compared to mysql?
The error it gives is:
Syntax error (missing operator) in query expression
crmcontactdetails.primaryFirmID= 10208 AND crmcontactdetails.type= 'In
House' LIMIT 1
I have to run an update query when a user deletes a record in a subform
of another form.
The query itself is:
UPDATE crmcontactdetails SET primary = 1 WHERE
crmcontactdetails.primaryFirmID= " & Me.primaryFirmID & " AND
crmcontactdetails.type= '" & Me.type & "' LIMIT 1
Now it works without the LIMIT 1 in it, however i need it there as it
will return multiple rows and i only want to update the first one it
finds.
The theory behind this query is that if a user deletes a contact for a
primaryfirm which is the primary contact for that type i need to set a
new primary contact that way every primaryfirm and type combo will have
a primary contact.
Ive tried the same query in mysql directly and it works, is there any
restrictions in access compared to mysql?
The error it gives is:
Syntax error (missing operator) in query expression
crmcontactdetails.primaryFirmID= 10208 AND crmcontactdetails.type= 'In
House' LIMIT 1