Update worked in XP but not 2013

imincorrigible
NewLounger
Posts: 13
Joined: 17 Jun 2014, 18:18

Update worked in XP but not 2013

Post by imincorrigible »

I have a form with subforms that worked fine in Access XP but not in Access 2013. After the control CItem is filled out on subform sfrminvoicerecd, it is suppose to update CItem in tblDetail. The on exit event cannot find the value of control PO on the subform. Can anyone tell why it would work in XP and not 2013?
Thanks for your help.
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78608
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Update worked in XP but not 2013

Post by HansV »

Welcome to Eileen's Lounge! (Long time no see)

I don't see how this could have worked. You cannot refer to sfrminvoicerecd!form![PO] within a SQL string. The following will hopefully work:

Code: Select all

    strSQL = "UPDATE tblPODetail set CloseItem = 'Y' where PO = " & Me.PO & " and JN =" & Chr(34) & Me.Combo28 & Chr(34)
Best wishes,
Hans

imincorrigible
NewLounger
Posts: 13
Joined: 17 Jun 2014, 18:18

Re: Update worked in XP but not 2013

Post by imincorrigible »

Thank you thank you for the welcome Hans.
Your code worked. Thank you for your help again. You have saved me more than once in the past.
I always enjoy looking at your solutions to everyone's questions.