Can't Access Subform

G

Guest

I have a main form named "newEmployee". On it, I have a subform called
"departments". The subform has two fields - a list box that lists all the
company departments, and a department ID number field that is updated after a
department name is selected in the list box.

When I open newEmployee in form view, it will not let me select anything in
the list box on the subform. The subform's properties are set to allow edits.
Also, when I switche from design to form view, I get a dialog box asking me
to enter the parameter value for Employees.empBNumber. The subform is based
on a query that is based on the Employees table, but the query does not use
the B number field from that table. The master field also does not use the
empBNumber field. So (1) why can't I click on the subform, and (2) why is it
asking me for a parameter that is not being used?

Many Thanks!
GwenH
 
P

pietlinden

do you have a relationship set up between the main form's recordsource
table and the table the subform query is based on?
 
G

Guest

No, because the records from the two tables aren't related. I'm trying to
create a way for users to select a new employee's department name and
department ID from a list of such, so that info can be used to update the
Employees table.
 
J

John Vinson

No, because the records from the two tables aren't related. I'm trying to
create a way for users to select a new employee's department name and
department ID from a list of such, so that info can be used to update the
Employees table.

You certainly should NOT be storing both the departmentID and the
department name in the employee table; that's redundant! Just store
the ID using a combo box (which can display the department name while
storing the ID).

And why shouldn't the tables be related? Surely you have a one
(department) to many (employees in that department) relationship?

John W. Vinson[MVP]
 
G

Guest

Duh! Why didn't I think of that? I've been working on this project too long ...

Thanks for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top