MenessFreak
New member
- Local time
- Today, 20:58
- Joined
- Jun 13, 2014
- Messages
- 5
Hi guys, i got a problem here.
I have two tables, table A and table B. Table A is a master table where it contains various values. I want to do it such that if user keyed in value X and value Y into Form B (linked to table B), it will check Table A for value X and value Y. If the values matched, it will display a new value (value Z) that is taken from Table A into Form B.
If IsNull(Me.txtValueX) Then
MsgBox "Please type Value X", vbInformation, "Value X Required"
Me.txtValueX.SetFocus
ElseIf IsNull(Me.txtValueY) Then
MsgBox "Please type Value Y", vbInformation, "Value Y Required"
Me.txtValueY.SetFocus
Else
If (IsNull(DLookup("[Value X]", "tblA", "[Value X] ='" & Me.txtValueX.Value & "'"))) Then
MsgBox "Unknown Value X"
ElseIf (IsNull(DLookup("[Value Y]", "tblA", "[Value Y] ='" & Me.txtValueY.Value & "'"))) Then
MsgBox "Unknown Value Y"
Else
????
I am stuck at this part where i am not sure how to retrieve value C out.
Please help.
Thanks in advance!
I have two tables, table A and table B. Table A is a master table where it contains various values. I want to do it such that if user keyed in value X and value Y into Form B (linked to table B), it will check Table A for value X and value Y. If the values matched, it will display a new value (value Z) that is taken from Table A into Form B.
If IsNull(Me.txtValueX) Then
MsgBox "Please type Value X", vbInformation, "Value X Required"
Me.txtValueX.SetFocus
ElseIf IsNull(Me.txtValueY) Then
MsgBox "Please type Value Y", vbInformation, "Value Y Required"
Me.txtValueY.SetFocus
Else
If (IsNull(DLookup("[Value X]", "tblA", "[Value X] ='" & Me.txtValueX.Value & "'"))) Then
MsgBox "Unknown Value X"
ElseIf (IsNull(DLookup("[Value Y]", "tblA", "[Value Y] ='" & Me.txtValueY.Value & "'"))) Then
MsgBox "Unknown Value Y"
Else
????
I am stuck at this part where i am not sure how to retrieve value C out.
Please help.
Thanks in advance!