Hi,
I have a combo box(cmboParts) and the row source is a part name. Once
a part is selected I have button(cmdOrder Add) to add data about this
part to a sub-form(frmParts_O rdered). However this sub-form does not
have the field PartName. Instead it has a field called PartCode.
Therefore i have had to set up a QBE to find PartCode(both PartName
and PartCode are in the same table 'tblPart') and this will be used in
the code for the button.
I have been having major problems trying out different things but they
haven't seemed to work. This is what i have so far:
Private Sub cmdOrderAdd_Cli ck()
msg = Forms!frmOrder! cmboParts
strSQL = "SELECT PartCode FROM tblPart WHERE PartName = "' & msg & "'"
Following this the QBE query has to come into use but i don't know how
to do it.
I'm sure there are some clever people who can help me!
Many thanks
James
I have a combo box(cmboParts) and the row source is a part name. Once
a part is selected I have button(cmdOrder Add) to add data about this
part to a sub-form(frmParts_O rdered). However this sub-form does not
have the field PartName. Instead it has a field called PartCode.
Therefore i have had to set up a QBE to find PartCode(both PartName
and PartCode are in the same table 'tblPart') and this will be used in
the code for the button.
I have been having major problems trying out different things but they
haven't seemed to work. This is what i have so far:
Private Sub cmdOrderAdd_Cli ck()
msg = Forms!frmOrder! cmboParts
strSQL = "SELECT PartCode FROM tblPart WHERE PartName = "' & msg & "'"
Following this the QBE query has to come into use but i don't know how
to do it.
I'm sure there are some clever people who can help me!
Many thanks
James
Comment