Private Sub search_Click()
Dim strForm As String
If Me.cbo_mat = "Titanium" Then
If Me.cbo_mt = "Ti-64" Then
If Me.cbo_form = "Sheet Metal" Then
If Me.cbo_data = "Hot Compression" Then
strForm = "FSearch"
Else
If Me.cbo_mat = "Titanium" Then
If Me.cbo_mt = "Ti-6246" Then
If Me.cbo_form = "Sheet Metal" Then
If Me.cbo_data = "Hot Compression" Then
strForm = "TAL7010Compression Data"
Else
strForm = "Master_Table"
End If
End If
End If
End If
End If
End If
End If
End If
DoCmd.OpenForm strForm
End Sub
Hi there, I am trying to run the code but getting the Run Time error 2494.However it executes correctly if I select the Ti-64 as in the first if block. I have to make an If statement based on options selected from 4 combo boxes. I am just trying with two possibilites here so that i could replicate for the rest if it runs. I am new at VBA.Please assit.
thanks
Dim strForm As String
If Me.cbo_mat = "Titanium" Then
If Me.cbo_mt = "Ti-64" Then
If Me.cbo_form = "Sheet Metal" Then
If Me.cbo_data = "Hot Compression" Then
strForm = "FSearch"
Else
If Me.cbo_mat = "Titanium" Then
If Me.cbo_mt = "Ti-6246" Then
If Me.cbo_form = "Sheet Metal" Then
If Me.cbo_data = "Hot Compression" Then
strForm = "TAL7010Compression Data"
Else
strForm = "Master_Table"
End If
End If
End If
End If
End If
End If
End If
End If
DoCmd.OpenForm strForm
End Sub
Hi there, I am trying to run the code but getting the Run Time error 2494.However it executes correctly if I select the Ti-64 as in the first if block. I have to make an If statement based on options selected from 4 combo boxes. I am just trying with two possibilites here so that i could replicate for the rest if it runs. I am new at VBA.Please assit.
thanks