I have 2 tables and a form. Table1 "PriceIndexWidg et"
Table2 "HistoryWid get" and Form "HistoryWidget" . I want to use a Checkbox on the form to populate a field value in the HistoryWidget table. I understand that when checkbox w001 is unchecked it = 0 and I populate field "me.widget0 01" value to 0 in table HistoryWidget. What I am trying to do is search the PriceIndexWidge t table, field Part# for the value of widget001. Widget001 is Part# in table PriceIndexWidge t. Then use it's value as the value for Me.Widget001 field on the form.
Can anyone give me some direction for developing the search code? I am not sure where to begin. I attached the database below. It is very basic but the logic will help me.
Code for Checkbox w001 on the form.
Table2 "HistoryWid get" and Form "HistoryWidget" . I want to use a Checkbox on the form to populate a field value in the HistoryWidget table. I understand that when checkbox w001 is unchecked it = 0 and I populate field "me.widget0 01" value to 0 in table HistoryWidget. What I am trying to do is search the PriceIndexWidge t table, field Part# for the value of widget001. Widget001 is Part# in table PriceIndexWidge t. Then use it's value as the value for Me.Widget001 field on the form.
Can anyone give me some direction for developing the search code? I am not sure where to begin. I attached the database below. It is very basic but the logic will help me.
Code for Checkbox w001 on the form.
Code:
Private Sub w001_Click()
'w001 = checkbox in form
'widget001 is field from tblHistoryWidget
If w001 = 0 Then
Me.widget001 = 0
Else
<SOME SEARCH ROUTINE HERE>
Me.widget001 = some value
End If
End Sub
Code:
[B][U]PriceIndexWidget Table[/U][/B] Part#, text PartDescription, text PartCost, currency
Code:
[U][B]HistoryWidget Table[/B][/U] quote#,text widget001 ,currency widget002, currency
Comment