M
mattdube
Background: I have an .adp linked to SQL 2005. We have a continuous
form that is based off a select query that populates a field called
'material'. We need a continuous form here because 1) we need to have
combo boxes to select data for an insert (I have an ADO insert script
written - not the problem here) and 2) we need to see all the materials
(query rows) at once. In the On Current event, I have vba code that
parses the material field and does a DLookup and returns the material
description. The material field can contain two different formats of
materialID, thus the need to parse the ID and do a DLookup on the
appropriate table. If you would like to see my VBA code please ask but
I don't believe the code is the issue because it works.
Problem: The description field populated by the DLookup always shows
the value for the selected form. When I select a different recordset,
the DLookup on all the continuous form instances changes to show the
description of the material of the selected form. All the DLookups are
always the same for each instance of the continuous form, and only show
the selected records material description. Please help me figure out
how to have the returned DLookup value be unique for each record on the
form. Is there another event I should put the DLookup code in, or is
there a way to specify uniqueness that I don't know about?
Thanks!
Matt
form that is based off a select query that populates a field called
'material'. We need a continuous form here because 1) we need to have
combo boxes to select data for an insert (I have an ADO insert script
written - not the problem here) and 2) we need to see all the materials
(query rows) at once. In the On Current event, I have vba code that
parses the material field and does a DLookup and returns the material
description. The material field can contain two different formats of
materialID, thus the need to parse the ID and do a DLookup on the
appropriate table. If you would like to see my VBA code please ask but
I don't believe the code is the issue because it works.
Problem: The description field populated by the DLookup always shows
the value for the selected form. When I select a different recordset,
the DLookup on all the continuous form instances changes to show the
description of the material of the selected form. All the DLookups are
always the same for each instance of the continuous form, and only show
the selected records material description. Please help me figure out
how to have the returned DLookup value be unique for each record on the
form. Is there another event I should put the DLookup code in, or is
there a way to specify uniqueness that I don't know about?
Thanks!
Matt