Having issues with DoCmd.OpenForm

DanielR

Registered User.
Local time
Today, 09:43
Joined
Mar 16, 2018
Messages
72
Having issues with DoCmd.OpenForm. I specify a search criteria, no errors pop up and when the form opens it goes to a new record. Also, the filter option at the bottom of the page turns yellow. When I click on it, it goes to the first record in the database, click again and it goes to the queried record that I specified in the OpenForm command.

Have no idea how to solve this...need help.
 
What is your docmd.openform?

Did you out the criteria as 3rd parameter (3rd comma)
 
My code is as follows:

strCriteria = "[Project Name]='" & Combo8 & "'"
DoCmd.OpenForm "Projects", , , stCriteria
Forms!Projects.SetFocus
 
docmd.openform is very simple....

'view all records
docmd.openform "MyForm"

'view 1 record from another form
docmd.openform "MyForm",,,"[id]=" & me.txtID

make sure the form design does NOT have set: DATAENTRY = YES
 
What us ur combos rowsource? Which column is it Bound?
 
Wow, it was because Data Entry was set to Yes...Thank you.
 

Users who are viewing this thread

Back
Top Bottom