0
votes

I am one of several people using this database. I am the only one getting this error.

When I open the form, named frmEmployeeDetails, there is a combobox that is supposed to be populated with the results of a query. If I try to select the combobox, it gives me an "Enter Parameter Value" prompt asking for Forms!frmEmployeeDetails.Caption. The Caption for the form is "EMPLOYEE DETAILS", but typing that in doesn't make the combobox work. The query for the combobox is asking for [FORMS]![frmEmployeeDetails].[Caption].

As far as I know I'm the only person getting this error. It happens only on my computer regardless of the version of the database opened (updates aren't fixing it). Re-installing Access didn't fix it either. I've also tried entering the [FORMS]![frmEmployeeDetails].[Caption] in the query and letting it auto-fill to make sure nothing was spelled wrong.

Here is the row source of the combobox.

SELECT tblFormDataTables.DataID
  , tblFormDataTables.Data 
FROM tblFormDataTables 
WHERE (((tblFormDataTables.Location)=[FORMS]![frmEmployeeDetails].[Caption])) 
ORDER BY tblFormDataTables.Data;

Any suggestions?

2
Can you post the control source of your combobox? I'm confused why you would be using the form caption in a query. Is it possible that there is actually a control on the form called "Caption"?MoondogsMaDawg
Here is the row source. SELECT tblFormDataTables.DataID, tblFormDataTables.Data FROM tblFormDataTables WHERE (((tblFormDataTables.Location)=[FORMS]![frmEmployeeDetails].[Caption])) ORDER BY tblFormDataTables.Data;Unre9istered
Have you checked your reference libraries in the VBA editor? Tools>references.MoondogsMaDawg

2 Answers

0
votes

If you're the only one getting this error out of several users, then I'd recommend that you use Database Tools -> Compact and Repair.

If that doesn't fix this issue, try recopying the database from a person's computer who has it functioning properly.

It seems your combobox has somehow become unlinked to its [FORMS]![frmEmployeeDetails].[Caption]. You could also test if a different user on this computer has the same problem or not.

0
votes

I do not know why it doesn't work on your computer, but it does on others. However, to get it to work you can create a hidden textbox that's set to the Form caption and replace the query criteria with a reference to your hidden textbox instead.