JohnHarkins
MIS
This ought to be simple.
I have:
tblMembers (main database)
tblPhones (zero, one or more records per member)
The result should look something like this for home, business, fax phones, etc. NB: where phone is in "our" area code (e.g., 203), no area code is listed. H=home, O=office, F=fax, M=mobile. text line box allows two "local" numbers, but only one non-local.
I want to create a single field (with some appropriate vbCRLF characters) to show the phone numbers for a given member. Of course, the phone numbers are separate records in the database and they include an area code in all cases.
I think that I need:
1. a query to pull all the phone numbers and sort them for a given member
2. a subreeport to handle the display
3. a piece of VBA code to examine the data and string together successive row/records for the phone numbers for the given member, put commas in, decide on where to break the line, etc.
Ideally, I'd like the solution to show the string with non-breaking spaces and non-breaking hyphens to assist in formatting the result. That may have to be jerry-rigged in order to get around the limitations of strings in a text box.
Am I on the right track? Is there a simpler way to handle this?
Thanks John Harkins
I have:
tblMembers (main database)
tblPhones (zero, one or more records per member)
The result should look something like this for home, business, fax phones, etc. NB: where phone is in "our" area code (e.g., 203), no area code is listed. H=home, O=office, F=fax, M=mobile. text line box allows two "local" numbers, but only one non-local.
Code:
Member A 555-1212 (H), 555-1213 (O),
(914) 555-1214 (OF),
(212) 555-1215 (M)
I want to create a single field (with some appropriate vbCRLF characters) to show the phone numbers for a given member. Of course, the phone numbers are separate records in the database and they include an area code in all cases.
I think that I need:
1. a query to pull all the phone numbers and sort them for a given member
2. a subreeport to handle the display
3. a piece of VBA code to examine the data and string together successive row/records for the phone numbers for the given member, put commas in, decide on where to break the line, etc.
Ideally, I'd like the solution to show the string with non-breaking spaces and non-breaking hyphens to assist in formatting the result. That may have to be jerry-rigged in order to get around the limitations of strings in a text box.
Am I on the right track? Is there a simpler way to handle this?
Thanks John Harkins