Report/Subform question.

G

Guest

Hi
I am new to Access and have created a very simple database. The first
table has two fields, the date and a master record number. The second table
also has a date and then possibly a repeat of any record number from
the first table. There is a relationship between the two tables linking
the record number fields. I have created a report which shows all the
records from the first table and a subform which should only show any
instances when a record number from the first table is found in the
second table. My query is, as I step through the records of the first
table, the record numbers from the first table appears in the subform
until I reach a genuine duplication of a record number and then the
record number is repeated once again plus the date and record number of
the duplication. I would like the subform to display no information
until a duplicated record is found. How can I solve this? Hope this
makes sense.
Thanks in advance for any advice.
Johno
 
D

Duane Hookom

How about you give us a few actual records and how you want these to appear
in your report/subreport. BTW: I would not use a subform as a subreport.
Consider saving the subform as a subreport.
 
G

Guest

Duane
Thanks for the reply.
I am currently only experimenting with my database at the moment until I get
it working correctly.
Table one has just two fields, the date and a record number (E.g: 123456AA,
234567AB, 345678AB, 456789AA....). Table one will hold all the master record
numbers.
Table two also has two fields, the date and a record number. Table two's
record numbers will only be ones that appears in table one (E.g: 345678AB).
My form and subform look okay but as I step through table ones records,
table ones record number keeps appearing in the subform although the record
number may not appear in table two. When a genuine record number match is
found in table two, the record number appears again as described above and
then the date and record number from table two because of the match. I would
like just the date and record number from table two to appear in the subform.
I know this is probably a very simple fix but I cannot work out what is
wrong. I can send you a copy of the database if required or a screen print if
this will help.
Thanks
Johno
 
D

Duane Hookom

I believe you are seeing a new record in the subform with a default in the
record number field of the value on the main form. You can set the subform
to not allow new records. Also, there generally isn't a need to display the
linking field in the subform since its value is displayed on the main form.
 
G

Guest

Thanks Duane
Can you let me know how to prevent the 'linking field' data being displayed
in the subform.
Johno
 
D

Duane Hookom

While in design view of the subform, select the 'linking field' and press
the delete key.
 

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