By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

Requery not working

100+
P: 102
Background: Front end- MS Access 2010/VBA, Back end- MS SQL Server 2008

I get the following error when I execute this command:
Expand|Select|Wrap|Line Numbers
  1.  With rstDB
  2.      .AddNew
  3.  
  4.         .Fields("Associate") = Me.fAssociate.Value
  5.         .Fields("Date") = Me.fDate.Value
  6.         .Fields("Project") = Me.fProject.Value
  7.         .Fields("Associate") = Me.fAssociate.Value
  8.         .Fields("Status") = status
  9.         .Fields("StatusDate") = Now()
  10.         .Fields("Notes") = Me.fNotes.Value
  11.         .Fields("md_DateTime") = datex
  12.         .Fields("md_Action") = "A"
  13.         .Fields("md_User") = gblUser
  14.  
  15.      .Update
  16.    End With
  17.  
  18.    rstDB.Close
  19.    dbsDB.Close
  20.  
  21.    Set rstDB = Nothing
  22.    Set dbsDB = Nothing
  23.  Forms![MyOpen_I].Form.Refresh
  24.  Forms![MyOpen].[MyOpen subform].Form.Requery
  25.  
Run-time error '2465'. Microsoft Access can't find the field '|1' referred to in your expression.

The error is with line 24. Thanks.
Mar 4 '15 #1
Share this Question
Share on Google+
1 Reply


twinnyfo
Expert Mod 2.5K+
P: 3,487
Trye this:

Expand|Select|Wrap|Line Numbers
  1. Forms![MyOpen].Form.[MyOpen subform].Form.Requery
Mar 4 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.