troubleshooting Question

Old access app gets an error 2113 when run under access 2007

Avatar of NewbieNeedsHelp
NewbieNeedsHelp asked on
Microsoft AccessVisual Basic Classic
5 Comments3 Solutions990 ViewsLast Modified:
A client had a win 98 machine running access 97 and a database app for running his small business that was written way back when.

we set him up on win xp pro and access 2007.

I set security to allow it to run the macros and things seem to be going ok.

but  he has a problem that causes an error 2113 - when he goes into an update form, chooses a client / invoice number from a pull down screen at the top, he gets:  

microsoft visual basic
run time error '2113'
the value you entered isn't valid for this field

continue (greyed out)  |  OK  |  Debug  |  help



If you hit debug, this is the section that it takes issue with  is below and the 3rd line from the bottom is highlighted:   Forms![job update]![frmcustcode] = rst![Customer Code]

any advice where to start?  He said it was working OK under his old machine (with access 97)


Private Sub Combo386_AfterUpdate()
  Dim db As DAO.Database
  Dim rst As DAO.Recordset
  Dim strwhere As String
  Set db = DBEngine.Workspaces(0).Databases(0)
  Forms![job update]![key] = Forms![job update]!Combo386.Column(1)
  DoCmd.ApplyFilter , "[Job Invoice Number] = Forms![Job Update]![key]"
  ' DoCmd.ApplyFilter , "[Job Invoice Number] = Forms![Job Update]![Combo386]"
  strwhere = "SELECT * from Customer WHERE [customer number] = '" & [customer acct number] & "'"
  Set rst = db.OpenRecordset(strwhere, dbOpenDynaset)
  Forms![job update]![frmcustcode] = rst![Customer Code]
  Forms![job update]![frmcustname] = rst![customer fname] & " " & rst![customer lname]
  DoCmd.GoToControl "job Location"
  Call total_Click
ASKER CERTIFIED SOLUTION
thenelson

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros