urjudo
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,
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,
Can you show the code?
ASKER
here is the code:
Private Sub Enter_Employer_Name_Click( )
On Error GoTo Err_Enter_Employer_Name_Cl ick
Dim stDocName As String
stDocName = "qryEmployerByName"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Enter_Employer_Name_C lick:
Exit Sub
Err_Enter_Employer_Name_Cl ick:
MsgBox Err.Description
Resume Exit_Enter_Employer_Name_C lick
End Sub
Private Sub Enter_Employer_Name_Click(
On Error GoTo Err_Enter_Employer_Name_Cl
Dim stDocName As String
stDocName = "qryEmployerByName"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Enter_Employer_Name_C
Exit Sub
Err_Enter_Employer_Name_Cl
MsgBox Err.Description
Resume Exit_Enter_Employer_Name_C
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.