N
Nora
This is/are my code(s)....
____________________________________________________________________
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Tender Record"
stLinkCriteria = "
____________________________________________________________________
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Tender Record"
stLinkCriteria = "
Code:
= " & "'" & Me![Code] & "' And [Reg No]= " & "'"
& Me![GQ No] & "' Or [Part]= " & "'" & Me![Part] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command4_Click:
Exit Sub
Err_Command4_Click
____________________________________________________________________
Another:
stLinkCriteria2 = "[Code]= " & "'" & Me![Code] & "' And [Reg No]= " & "'" &
Me![GQ No] & "' And [Part]= " & "'" & Me![Part] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria2
____________________________________________________________________
(1)
How to combine these 2 criterias? So, the condition is if the 1st criteria
fails to display the record(s), the 2nd criteria will open the form "Tender
Record".
(2)
The idea is ([Part] & Me![Part]) is an optional filter textbox. If there is
an input, the result will display ONLY 1 record. Otherwise fixed at 1 record
only or 2~ 3 or more records with the same code & key nos. (here are "Code" &
GQ No").
____________________________________________________________________
Please help. I'm desparate.
Regards,
NH