Forms help (1 Viewer)

ckhatch

New member
Local time
Today, 06:38
Joined
Feb 11, 2001
Messages
9
I have a form and I need to have 2 or 3 fields that are updated with data when I put data in another field (combo box) on that form
e.g Part number (combo box) updates part price and and description
I know how to do this normally but the problem is that the table I get this data from is not the forms main data source
I cant create a query based on the two tables because I cant link the primary key
I am sure this is easy but I cant figure it out
Thanks
Kevin
 

charityg

Registered User.
Local time
Today, 06:38
Joined
Apr 17, 2001
Messages
634
AfterUpdate event of the combo box. Create a recordset based on the table that contains the part and description information. If NoMatch=false then code the values on the form to equal the recordset value. For example
rst.findfirst "[partnum]='" & cmbpartnum &"'"
if rst.nomatch=false then
with forms!frmname
!price=rst!price
!description=rst!description
end select
end if
 

Users who are viewing this thread

Top Bottom