Macros to find records

J

John N

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.
 
K

Ken Snell

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.
 
S

Steve Schapel

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
 
J

John N

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.
 
K

Ken Snell

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.
 
S

Steve Schapel

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
 
B

bene

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.
 

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