5 replies
by jc2it
by jc2it
"part number field and the part description field are in the same field"
Oops, that should have said, "part number field and the part description field are in the same table"
by ironfist03
let me further clarify my question,, first,, yes the part_num and desc are in the same table,, however i am using 2 tables,, one is the table where the form stuffs the inputted data,, the 2nd i am using as the input for the part_no in a combo box so that if the user types a bogus part number it will choke at that point,, i only want legal part numbers at data input.. the problem is that there are 2 fields i need to tie together,, when the user types the part_num (from a query for the fields row source)on field a)then i am trying to get the description of that part to auto populate field b).. and that is my conundrum..
by leewolff2
What I have done in a few of my applications is as follows:
Both the Part Number and Part Description fields are comboboxes. Their lists are set to a source table consisting of both the part number and description. The column count property is set to 2. Both columns are displayed in the list for the part number field. Only the description column is displayed in the list for the description combobox. This is done by setting the column widths property to 0.5";5".
Since both the part number and description values are present in a selection in each combobox, I can set the choice in the unused combobox as follows:
cboICD_9_CM_Diagnosis_Code ~= the part number field
cboICD_9_CM_Description ~= the part description field
This code was from a medical application.
Private Sub cboICD_9_CM_Diagnosis_Code_AfterUpdate()
If cboICD_9_CM_Diagnosis_Code.ListIndex > -1 Then
'If a choice has been made...
cboICD_9_CM_Description.Value =
cboICD_9_CM_Diagnosis_Code.Column(1)
'Make the corresponding choice in the other
'combobox
End If
End Sub
Private Sub cboICD_9_CM_Description_AfterUpdate()
If cboICD_9_CM_Description.ListIndex > -1 Then
'If a choice has been made...
cboICD_9_CM_Diagnosis_Code = cboICD_9_CM_Description.Column(0)
'Make the corresponding choice in the other
'combobox
End If
End Sub
by ironfist03
This discussion is closed to new replies.
Trending Software posts
Sort by Trending