I have an entry field called Pat_Medication, behind that entry field is a combo box with multiple columns. If they select one of the values in the combo box, I fill various other fields from the columns. This works great, they can use the combo box values, or enter a value manually. i want to fill a field called Pat_Med_Generic with the data in column 8, if the user uses the combo box pull down, if they don't, i want to put the value that was manually entered in the Pat_Medication field into the field Pat_Med_Generic.
My logic looks like this:
CODE
Me.Pat_Med_Generic = Me.Medication_ID_Combo.Column(8)
'Add logic to check to see if blank, if blank will fill with data from field Pat_Medication
If Me.Pat_Med_Generic Is blank Then
Me.Pat_Med_Generic = Me.Pat_Medication
End If
'Add logic to check to see if blank, if blank will fill with data from field Pat_Medication
If Me.Pat_Med_Generic Is blank Then
Me.Pat_Med_Generic = Me.Pat_Medication
End If
The first part,
Me.Pat_Med_Generic = Me.Medication_ID_Combo.Column(8) works fine, its just i am trying to tell the program, if they don't use a value in the combo box, i.e. enter it manually, then put the value entered in the field Me.Pat_Medication into the Me.Pat_Med_Generic field.
Any suggestions, or see what I am doing wrong?
I tried to use me.pat_med_Generic is null, or is " " but either way, it either gives me an error or will not fill the field. I also tried if Me.Medication_ID_Combo.Column(8) is blank or null or " " but neither seemed to work properly.
Any suggestions?
Thanks in advance!
