Data Entry in Subforms

S

Stephen Brown

I have two tables in a database, one with employee
details and the other recording leave taken.

I have created a form which has the employee details in
the main form and a subform showing the data in the leave
taken form relating to that employee.

When I enter new leave data in the sub form, I thought
that Access would automatically pick up the relevant name
data from the main form, and inserted it in the name
field in the sub form. However this isn't what is
happening. What is actually happening is that it appears
to be recording the name of the form in the name field of
the subform table instead.

Can anyone tell me where I've gone wrong?

Stephen Brown
 
A

Allen Browne

If you have a field called "Name", then yes, it is ambiguous. Rename the
field to solve the problem.

The form has a Name property, so:
Forms.Form1.Name
is "Form1".
 
S

Stephen Brown

Thank you for that - Such a simple reason - it's been
driving me crazy because I knew that it worked with other
databases I'd created and I'd looked at everything trying
to find out what I had done differently.

Stephen Brown
 

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