M
Matthew DeAngelis
Hello again,
I am having some trouble with VBA code that I do not think I can solve
on my own (I'm not very good with the stuff).
Basically, I am trying to see if I can use the same form to both list
all of the companies in the database and to search for a specific
company. I am trying to apply a filter in code to accomplish this.
This is a code snippet from the command button:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm: AllCompanies"
stLinkCriteria = "Forms![frm: AllCompanies]!Company = '*' & [Enter
Company Here] & '*'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I am not sure what is wrong. The [Enter Company Here] prompt comes up,
I type in the first company in the database, but the form opens on a
blank record (1 of 1) (Filtered). Does anyone know what is wrong with
my link criteria statement?
Thanks,
Matt
I am having some trouble with VBA code that I do not think I can solve
on my own (I'm not very good with the stuff).
Basically, I am trying to see if I can use the same form to both list
all of the companies in the database and to search for a specific
company. I am trying to apply a filter in code to accomplish this.
This is a code snippet from the command button:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm: AllCompanies"
stLinkCriteria = "Forms![frm: AllCompanies]!Company = '*' & [Enter
Company Here] & '*'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I am not sure what is wrong. The [Enter Company Here] prompt comes up,
I type in the first company in the database, but the form opens on a
blank record (1 of 1) (Filtered). Does anyone know what is wrong with
my link criteria statement?
Thanks,
Matt