Hi, thank you in advance, new to access, apologies if repeating question- you know I've searched!
Main form has 2 subforms. Subform1: Displays a two boxes, shortext fields that have control sources in a table. they are numbers 02 and 01 respectively in those two boxes.
A second subform shows similar values tied to a different table. There are four this time. Again they are 02 and 01 and another set 03 and 05. These values change based on my selection (from a query).
I want my third subform, to display in a textbox the value 1 if the top two numbers match either of the bottom pairs. Ex: 02 and 01 matches 02 and 01 on subform2 in example above. However if subform to was instead 04 and 04 and 03 and 05....the textbox would return a value of 0. I am calculating and either or match basically between fields.
I have no idea how to do this. Represent them as strings, set fields equal in an If statement. I've tried setting the on load event of subform 3 to be as follows:
If (txtAform1 = txtAform2) And txtBform1 = txtBform2 OR (txtAform1 = txtCform2) And txtBform1 = txtCform2 Then
Me.txtcompare = "1"
Else: Me.txtcompare = "0"
End If
End Sub
txtcompare is the textbox on form 3.
I've tried so many iterations, trying to use syntax on ever copied ever referred mvp page that tells you how to refer to controls on subforms so please do not direct me to that page!!!!!
if you can help great, I'd appreciate it. duh
:banghead: 
Main form has 2 subforms. Subform1: Displays a two boxes, shortext fields that have control sources in a table. they are numbers 02 and 01 respectively in those two boxes.
A second subform shows similar values tied to a different table. There are four this time. Again they are 02 and 01 and another set 03 and 05. These values change based on my selection (from a query).
I want my third subform, to display in a textbox the value 1 if the top two numbers match either of the bottom pairs. Ex: 02 and 01 matches 02 and 01 on subform2 in example above. However if subform to was instead 04 and 04 and 03 and 05....the textbox would return a value of 0. I am calculating and either or match basically between fields.
I have no idea how to do this. Represent them as strings, set fields equal in an If statement. I've tried setting the on load event of subform 3 to be as follows:
If (txtAform1 = txtAform2) And txtBform1 = txtBform2 OR (txtAform1 = txtCform2) And txtBform1 = txtCform2 Then
Me.txtcompare = "1"
Else: Me.txtcompare = "0"
End If
End Sub
txtcompare is the textbox on form 3.
I've tried so many iterations, trying to use syntax on ever copied ever referred mvp page that tells you how to refer to controls on subforms so please do not direct me to that page!!!!!
if you can help great, I'd appreciate it. duh

