Solved

How do I requery an MS Acess Form

Posted on 2011-09-29
12
222 Views
Last Modified: 2012-05-12
I have an access form that I'm requering. The requery works fine however when the action is finished the first record is displayed. How do I stay on the current record?

Private Sub ProviderName_DblClick(Cancel As Integer)
 DoCmd.OpenForm "frmService", , , , , acDialog
 DoCmd.Requery
End Sub
0
Comment
Question by:shieldsco
  • 6
  • 6
12 Comments
 
LVL 75
ID: 36818926
First, because you are using acDialog ... the Requery will not happen until you Close frmService.  Is this your intent?

And actually, which form are you wanting to requery?

mx
0
 

Author Comment

by:shieldsco
ID: 36818953
Yes that's  exactly what I want.  I want to requery the main form. When I double click the the Provider Name on the main form the frmService opens and I double click on the FullNName filed which populates the Provider Name on the main form. I close the frmService and the requery runs however after completion the first record is displayed.
0
 
LVL 75
ID: 36818961
ok ... but actually, why do you need to Requery ?

Can you upload the db ?

mx
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

Author Comment

by:shieldsco
ID: 36818993
Yes -- attached -- from the main menu select Sign-In and then double click on Provider Name which opens the the frmService and the user can select a Provider (Full Name)
SignIn-V1.accdb
0
 
LVL 75
ID: 36819013
ok ... I did that ... seems to work.  Why do you need a requery?

mx
0
 

Author Comment

by:shieldsco
ID: 36819062
for the dlookup
0
 
LVL 75
ID: 36819073
Sorry ... not quite following ?

Dlookup where ?

mx
0
 

Author Comment

by:shieldsco
ID: 36819091
Provider Name, Provider title, Provider EXT
0
 
LVL 75
ID: 36819157
Sorry ... but where is the DLookup() ... and why would that need a Requery ?

mx
0
 

Author Comment

by:shieldsco
ID: 36819159
I figured it  out instead of requery -- me.refresh
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 36819183
About to suggest that!

mx
0
 

Author Closing Comment

by:shieldsco
ID: 36819863
Thanks
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question