information problem

G

Guest

I have a main from that pulls infor from an emp database. I also have a
subform where users add information. Problem, when I look at the table where
the inform is added, it shows the next emp # under the one I entered, along
with that emp information, not the employee # and infor that was showing on
the form. What am I doing wrong? I am not a programmer so I do not know how
to add code. All the infor on my form looks good, it is just bringing in the
very next record. Thanks,
 
G

Guest

You need to explain this more clearly.
Why are you using a subform?
A subform is normally used where you have two tables in a one-to-many
relationship.
Is there another table that you have not mentioned?
Which table is exhibiting the problem?

Dorian
 
G

Guest

The reason I am using a subform is that my main form pulls infor from an emp
query because I am pulling out sworn who is still active from a personnel
datab on our server. The subform is using a badge table and this is where
users enter additional inform. They type in the employee # (mainform) and it
populates the main form and the emp field of the subform, then they enter
into the subform the badge infor. But somehow when I run a query using the
emp query and badge table and they are joined by emp # it brings in the
correct infor that was entered in the subform but attaches it to the next emp
record in line.
 
J

John Vinson

The reason I am using a subform is that my main form pulls infor from an emp
query because I am pulling out sworn who is still active from a personnel
datab on our server. The subform is using a badge table and this is where
users enter additional inform. They type in the employee # (mainform) and it
populates the main form and the emp field of the subform, then they enter
into the subform the badge infor. But somehow when I run a query using the
emp query and badge table and they are joined by emp # it brings in the
correct infor that was entered in the subform but attaches it to the next emp
record in line.

Please open this query in SQL view (use the View menu option, or the
leftmost icon dropdown in the query design toolbar) and post the SQL
text here. It would help to indicate the primary keys and linking
fields of the tables in the query.

Note that a Subform would generally NOT be based on a two-table query;
you'ld use the "one" side table - personnel - as the recordsource for
the mainform, and the "many" side table - badge - as the subform. The
EmployeeID would be the Master and Child Link Field of the subform.

John W. Vinson[MVP]
 

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

Similar Threads


Top