Macros to find records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working with a school database and I'm trying to make a report that can be printed as a directory. In my database I have addresses for the a student's mother and the same student's father. Can i use a macro in a report that will not list the same address twice if both parents live at the same address. If the parents are divorced or whatever and have different addresses I need to list both.
 
This doesn't sound like something that's handled by a macro. Depending upon
how your table is structured, it could be done via VBA code, using the code
to read the table and to generate new records for outputting into a report,
etc.

You'll need to tell us more about how your table is designed/set up.

--
Ken Snell
<MS ACCESS MVP>

John N said:
I am working with a school database and I'm trying to make a report that
can be printed as a directory. In my database I have addresses for the a
student's mother and the same student's father. Can i use a macro in a
report that will not list the same address twice if both parents live at the
same address. If the parents are divorced or whatever and have different
addresses I need to list both.
 
John,

In addition to Ken's comments, perhaps the Hide Duplicates property of
the Address textbox on the report may be applicable.

- Steve Schapel, Microsoft Access MVP
 
Ken,
where do I learn about VBA code?

----- Ken Snell wrote: -----

This doesn't sound like something that's handled by a macro. Depending upon
how your table is structured, it could be done via VBA code, using the code
to read the table and to generate new records for outputting into a report,
etc.

You'll need to tell us more about how your table is designed/set up.

--
Ken Snell
<MS ACCESS MVP>

John N said:
I am working with a school database and I'm trying to make a report that
can be printed as a directory. In my database I have addresses for the a
student's mother and the same student's father. Can i use a macro in a
report that will not list the same address twice if both parents live at the
same address. If the parents are divorced or whatever and have different
addresses I need to list both.
 
Best place is to start with a book on ACCESS; there are many of them in
bookstores, and most of them include VBA code. Some focus exclusively on VBA
code use in ACCESS.
 
John,

To make a start, you can look up Access Help on VBA. Also, most good
books on Microsoft Access will have information on the use of this
programming language.

Having said this, the solution to the particular question you have
raised is very unlikely to relate to the use of VBA. The solution is
much more likely to be related to correct data structure, the
formulation of the query that the report is based on, and the use of
the report's sorting and grouping and formatting features.

- Steve Schapel, Microsoft Access MVP
 
Hi,

What data do you need to pull into the report? Will you be including
both parents' names when you print it, or is it just of the students
and you're trying to avoid duplicating students' names?

Thanks.
 
Back
Top