Link to home
Start Free TrialLog in
Avatar of urjudo
urjudoFlag for United States of America

asked on

Access Query display

Hi Experts,
I have a form "Employer" there is a command button for search an employer, once user enter first few letters of the employer, it will open a query for them to see all the employers with the same first few letters that user enter.  my problem is every time when the query opens, it opens behind the form, is any way I can bring the query in front of the form?

Thanks,
Avatar of dovidf
dovidf
Flag of United States of America image

Can you show the code?
Avatar of urjudo

ASKER

here is the code:
Private Sub Enter_Employer_Name_Click()
On Error GoTo Err_Enter_Employer_Name_Click

    Dim stDocName As String
       
    stDocName = "qryEmployerByName"
    DoCmd.OpenQuery stDocName, acNormal, acEdit
   
   
Exit_Enter_Employer_Name_Click:
    Exit Sub

Err_Enter_Employer_Name_Click:
    MsgBox Err.Description
    Resume Exit_Enter_Employer_Name_Click
End Sub
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of urjudo

ASKER

@PatHartman
I was thinking to use datasheet query just because only two users can access to update the table, so your suggest is use a form instead a query and the two users can modify on the form, is correct?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It doesn't matter how many users can access the database.  Your job is to protect them from themselves.  I am a very experienced developer.  If I have to modify production data (which I avoid like the plague), I always use the same form I gave the users.  The form has all the validation code and it ensures the data is correct before it is saved.