B
bluegrassstateworker
I have a form with subforms that reference other tables. I have a
button which uses DoCmd.SendObject to create an email message and
includes these values into a text field as part of the email message.
It works fine for the fields in one table but not two others. For
example
Group table: contains the group information - group contact, address,
phone, etc.
Position table: contains positions available for each group - related
to the group table.
Individual table: contains information on individuals filling
positions the group has open.
While debugging, I am able to verify that my Position fields are
collecting the correct values but when I reference either the
Individual or Group Table field I get an error indicating the field
cannot be found.
Here is some code:
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Set dbs = CurrentDb
............. and so on to the value capturing
*** REFERENCES POSITION TABLE FIELDS CORRECTLY
strStartDate = Nz([PStartDate], "")
strEndDate = Nz([PEndDate], "")
** REFERENCE TO INDIVIDUAL TABLE FIELD VALUE FAILS HERE ***
strIndFirst = Nz([IFirstName], "Vacant or No Entry")
strIndLast = Nz([Individual].[ILastName], "")
strIndHomeCity = Nz([IHomeCity], "")
What should I do to change the pointer to the correct record in each
table?
button which uses DoCmd.SendObject to create an email message and
includes these values into a text field as part of the email message.
It works fine for the fields in one table but not two others. For
example
Group table: contains the group information - group contact, address,
phone, etc.
Position table: contains positions available for each group - related
to the group table.
Individual table: contains information on individuals filling
positions the group has open.
While debugging, I am able to verify that my Position fields are
collecting the correct values but when I reference either the
Individual or Group Table field I get an error indicating the field
cannot be found.
Here is some code:
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Set dbs = CurrentDb
............. and so on to the value capturing
*** REFERENCES POSITION TABLE FIELDS CORRECTLY
strStartDate = Nz([PStartDate], "")
strEndDate = Nz([PEndDate], "")
** REFERENCE TO INDIVIDUAL TABLE FIELD VALUE FAILS HERE ***
strIndFirst = Nz([IFirstName], "Vacant or No Entry")
strIndLast = Nz([Individual].[ILastName], "")
strIndHomeCity = Nz([IHomeCity], "")
What should I do to change the pointer to the correct record in each
table?