?
Solved

How do I requery an MS Acess Form

Posted on 2011-09-29
12
Medium Priority
?
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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 1500 total points
ID: 36819183
About to suggest that!

mx
0
 

Author Closing Comment

by:shieldsco
ID: 36819863
Thanks
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

762 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