mamradzelvy
Member
- Local time
- Today, 19:17
- Joined
- Apr 14, 2020
- Messages
- 145
Hi,
I have a form that tracks our currently pending invoices.
In order to "finalise" an invoice (set its Status from 0 to -1) i've got a pop-up form that has 3 buttons on it.
Each button applies the -1 value into diferent records, one button takes a single selection from the underlying listbox from the mainform and UPDATEs it's Status, second button applies it to all that are currently active (status = 0) and the last one is supposed to apply it only to all active members of any given selected client from a combobox selection i have present on the main form.
However despite my best efforts to check whether there has been any selection in said combo box i have failed thus far.
What's wrong with my code?
also a part of my on load event i have got
I have a form that tracks our currently pending invoices.
In order to "finalise" an invoice (set its Status from 0 to -1) i've got a pop-up form that has 3 buttons on it.
Each button applies the -1 value into diferent records, one button takes a single selection from the underlying listbox from the mainform and UPDATEs it's Status, second button applies it to all that are currently active (status = 0) and the last one is supposed to apply it only to all active members of any given selected client from a combobox selection i have present on the main form.
However despite my best efforts to check whether there has been any selection in said combo box i have failed thus far.
What's wrong with my code?
Code:
Private Sub btnClientWide_Click()
If Forms!formTabuleMini!txtKlient.Value = Null Then
MsgBox "No selection!" & vbCrLf & vbCrLf & "Go back and select a client from the dropdown menu in order to use this function.", vbInformation, "Error!"
Else
DoCmd.RunSQL "UPDATE Tabule1 SET TabStatus = '-1', TabDate2 = Now() WHERE TabKlient LIKE '" & Forms!formTabuleMini!txtKlient & "*' AND TabStatus LIKE 0;"
Globals.Logging "Tabule - Client Wide Finalisation"
End If
End Sub
also a part of my on load event i have got
Me.txtKlient.Value = Null
to make sure the value is in fact NULL