B
Bruce
This is very similar to a question I posted a few days
ago. I received a response, which led me to more
questions, but I have not received any further response in
that thread, so am starting a new one based on the
original, the response, and my follow-up question.
I have a form (frmVendorInfo) that displays information
about a vendor. At the top of the form is a box
(FindVendor)to select the vendor. That control is a drop-
down list. Its Row Source is a SQL statement, I think
(SELECT DISTINCTROW [etc.]). Somebody else started the
form, so I'm not sure. Anyhow, once the vendor is
selected, other information (address, phone, etc.) from
the selected record populates the rest of the form. I
have another form (frmVendorFax) that will send a fax to a
vendor, but so far the only way to select the vendor is
with the record selector at the bottom of the form. I
want to place a command button on frmVendorInfo that when
clicked will open frmVendorFax. I can do this to the
extent of getting the Vendor Fax form to open, but I do
not know how to tell Vendor Fax to use the currently
selected record for company name, fax number, and other
fields. Right now I still have to scroll through all of
the records until I get to the one I want.
I posted a similar question a few days ago, and received
one answer that said what I needed to do was to put a
command button on frmVendorInfo that opens frmVendorFax,
and that the On Open event for frmVendorFax needs to
contain a script. The script provided was:
' declare variables
Dim strVendor as String
Dim strFilter as String
strVendor = [Forms]![frmVendorInfo]![VendorIDControl]
strFilter = "[VendorID] = '" & strVendor & "'"
' apply filter
DoCmd.ApplyFilter , strFilter
However, [VendorIDControl] is not one of my fields, nor is
[VendorID]. Perhaps the person who responded assumed I
would understand what I needed to do, but there is a
reason I am posting in the Getting Started forum.
By the way, I am a relative beginner, but I understand
some of the basics such as how to set up an event
procedure.
ago. I received a response, which led me to more
questions, but I have not received any further response in
that thread, so am starting a new one based on the
original, the response, and my follow-up question.
I have a form (frmVendorInfo) that displays information
about a vendor. At the top of the form is a box
(FindVendor)to select the vendor. That control is a drop-
down list. Its Row Source is a SQL statement, I think
(SELECT DISTINCTROW [etc.]). Somebody else started the
form, so I'm not sure. Anyhow, once the vendor is
selected, other information (address, phone, etc.) from
the selected record populates the rest of the form. I
have another form (frmVendorFax) that will send a fax to a
vendor, but so far the only way to select the vendor is
with the record selector at the bottom of the form. I
want to place a command button on frmVendorInfo that when
clicked will open frmVendorFax. I can do this to the
extent of getting the Vendor Fax form to open, but I do
not know how to tell Vendor Fax to use the currently
selected record for company name, fax number, and other
fields. Right now I still have to scroll through all of
the records until I get to the one I want.
I posted a similar question a few days ago, and received
one answer that said what I needed to do was to put a
command button on frmVendorInfo that opens frmVendorFax,
and that the On Open event for frmVendorFax needs to
contain a script. The script provided was:
' declare variables
Dim strVendor as String
Dim strFilter as String
strVendor = [Forms]![frmVendorInfo]![VendorIDControl]
strFilter = "[VendorID] = '" & strVendor & "'"
' apply filter
DoCmd.ApplyFilter , strFilter
However, [VendorIDControl] is not one of my fields, nor is
[VendorID]. Perhaps the person who responded assumed I
would understand what I needed to do, but there is a
reason I am posting in the Getting Started forum.
By the way, I am a relative beginner, but I understand
some of the basics such as how to set up an event
procedure.