hello
i have 48 textbox in same form to receive invoices from our collector
i have a code to dlookup the invoice if paid or not
instead of putting this code 48 times, can anyone help to reduce the codeand work for the 48 textbox
thanks in advance
i have 48 textbox in same form to receive invoices from our collector
i have a code to dlookup the invoice if paid or not
Code:
Dim InvN As String
If DLookup("ID", "tbl_Clients_Charging", "[ID] = " & Me.txt_01 & " And [AccountPaidStatus] = '" & "Paid" & " '") > 0 Then
Me.txt_01 = ""
Me.txt_01_Name = ""
ElseIf DLookup("ID", "tbl_Clients_Charging", "[ID] = " & Me.txt_01 & " And [AccountPaidStatus] = '" & "Not Paid" & " '") > 0 Then
InvN = DLookup("ClientName", "tbl_Clients_Charging", "[ID] = " & Me.txt_01 & " And [AccountPaidStatus] = '" & "Not Paid" & " '")
Me.txt_01_Name = InvN
Else
Me.txt_01 = ""
Me.txt_01_Name = ""
End If
instead of putting this code 48 times, can anyone help to reduce the codeand work for the 48 textbox
thanks in advance