Data Entry in Subforms

  • Thread starter Thread starter Stephen Brown
  • Start date Start date
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
 
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".
 
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
 
Back
Top