S
Scott
Help! I have a program in which there are two tables (more than 2, but for
now...). Table A has fields that include CustomerID (autonumber, primary
key). Table B has fields that include CustomerID (Long Integer) and PetID
(autonumber, primary key). Table A--parent--is linked to Table B through
CustomerID.
Because of screen limitation size, I set up tabs and included part of Table
A under Tab 1 (lets call it Subform A) and all of Table B under Tab 2 (lets
call it Subform B). In the area above the tabs I essentially have only the
FirstName and LastName fields. In Subform A I have the remaining fields
associated with Table A (street address, tel. nos., etc.). The parent and
Subform A are linked using properties (Link Child Fields: CustomerID; Link
Master Fields: CustomerID). All-in-all, this approach has worked
well...except....
In the parent area I put a search button. I can click in, say, the LastName
field, press the 'binoculars' and enter the Find criteria...works like a
charm. If, however, I try to do the same thing in any of the subform fields
this approach does not work. I have a particular need to search for records
based on the PetID field in Subform B. I created a query that does this
pretty effectively; the SQL code reads as follows:
SELECT PetInfo.PetID, ClientInfo.LastName, ClientInfo.FirstName,
ClientInfo.BillingAddress, ClientInfo.City, ClientInfo.State,
ClientInfo.ZipCode, ClientInfo.HomePhoneNumber, ClientInfo.WorkPhoneNumber,
PetInfo.PetsName, PetInfo.ColorDescription, PetInfo.PetType, PetInfo.PetSex,
PetInfo.Breed, ClientInfo.CustomerID
FROM ClientInfo LEFT JOIN PetInfo ON ClientInfo.CustomerID =
PetInfo.CustomerID
WHERE (((PetInfo.PetID)=[Enter Pet Identification Number]));
This too works just dandy. My problem is that instead of pulling up a
spreadsheet (dynaset), what I really want to do is to have the program move
to that record in the forms view so that I can more readily edit other fields
and otherwise work with the data. I've researched the knowledgebase and
newsgroups and don't see anything that would seem to help. I've played
around with changing the Select query to a Make Table query that would write
the PetID number to a temporary table that could then be referenced 'somehow'
to move to the desired record. Something tells me I'm going about this the
hard way. Any suggestions on how to tackle this critter would be most
welcome.
now...). Table A has fields that include CustomerID (autonumber, primary
key). Table B has fields that include CustomerID (Long Integer) and PetID
(autonumber, primary key). Table A--parent--is linked to Table B through
CustomerID.
Because of screen limitation size, I set up tabs and included part of Table
A under Tab 1 (lets call it Subform A) and all of Table B under Tab 2 (lets
call it Subform B). In the area above the tabs I essentially have only the
FirstName and LastName fields. In Subform A I have the remaining fields
associated with Table A (street address, tel. nos., etc.). The parent and
Subform A are linked using properties (Link Child Fields: CustomerID; Link
Master Fields: CustomerID). All-in-all, this approach has worked
well...except....
In the parent area I put a search button. I can click in, say, the LastName
field, press the 'binoculars' and enter the Find criteria...works like a
charm. If, however, I try to do the same thing in any of the subform fields
this approach does not work. I have a particular need to search for records
based on the PetID field in Subform B. I created a query that does this
pretty effectively; the SQL code reads as follows:
SELECT PetInfo.PetID, ClientInfo.LastName, ClientInfo.FirstName,
ClientInfo.BillingAddress, ClientInfo.City, ClientInfo.State,
ClientInfo.ZipCode, ClientInfo.HomePhoneNumber, ClientInfo.WorkPhoneNumber,
PetInfo.PetsName, PetInfo.ColorDescription, PetInfo.PetType, PetInfo.PetSex,
PetInfo.Breed, ClientInfo.CustomerID
FROM ClientInfo LEFT JOIN PetInfo ON ClientInfo.CustomerID =
PetInfo.CustomerID
WHERE (((PetInfo.PetID)=[Enter Pet Identification Number]));
This too works just dandy. My problem is that instead of pulling up a
spreadsheet (dynaset), what I really want to do is to have the program move
to that record in the forms view so that I can more readily edit other fields
and otherwise work with the data. I've researched the knowledgebase and
newsgroups and don't see anything that would seem to help. I've played
around with changing the Select query to a Make Table query that would write
the PetID number to a temporary table that could then be referenced 'somehow'
to move to the desired record. Something tells me I'm going about this the
hard way. Any suggestions on how to tackle this critter would be most
welcome.