B
bw
When I first click on the CancelFlightButton, the Default Value "Select a
Flight" appears in the ComboBox. After the first click, I am unable to set
the value of the ComboBox to "Select a Flight" again, as the ComboBox is a
numeric field.
How do I reset the value in the ComboBox so it displays "Select a Flight" as
it did the first time?
Thanks for your help. If you need more information, please ask me.
The following are some particulars of my application.
I have a Command Button "CancelFlightButon" which has the following code:
Private Sub CancelFlightButton_Click()
CancelFlight.Visible = True
cboCancelFlight.SetFocus
CancelFlightButton.Visible = False
End Sub
I have the following unbound Combo Box , which has a Default Value = "Select
a Flight", and it is hidden behind the "CancelFlightButton" Command Button.
The Combo Box has the following code (if ans =vbYes, I do something else):
Private Sub cboCancelFlight_Click()
Dim ans
ans = MsgBox("Are you sure you want to delete Request Number " &
CancelFlight & "?", 36, "Be Sure")
If ans = vbNo Then
cboCancelFlight = Null...................I have tried to set this to
"Select a Flight", but I get a syntax error.
CancelFlightButton.Visible = True
CancelFlightButton.SetFocus
cboCancelFlight.Visible = False
Exit Sub
End If
End Sub
The RowSource for cboCancelFlight is as follows:
SELECT DISTINCT tblSelectMainReport.RequestNum
FROM tblSelectMainReport
WHERE (((Nz([RequestNum],0)) Between 1 And 10));
Flight" appears in the ComboBox. After the first click, I am unable to set
the value of the ComboBox to "Select a Flight" again, as the ComboBox is a
numeric field.
How do I reset the value in the ComboBox so it displays "Select a Flight" as
it did the first time?
Thanks for your help. If you need more information, please ask me.
The following are some particulars of my application.
I have a Command Button "CancelFlightButon" which has the following code:
Private Sub CancelFlightButton_Click()
CancelFlight.Visible = True
cboCancelFlight.SetFocus
CancelFlightButton.Visible = False
End Sub
I have the following unbound Combo Box , which has a Default Value = "Select
a Flight", and it is hidden behind the "CancelFlightButton" Command Button.
The Combo Box has the following code (if ans =vbYes, I do something else):
Private Sub cboCancelFlight_Click()
Dim ans
ans = MsgBox("Are you sure you want to delete Request Number " &
CancelFlight & "?", 36, "Be Sure")
If ans = vbNo Then
cboCancelFlight = Null...................I have tried to set this to
"Select a Flight", but I get a syntax error.
CancelFlightButton.Visible = True
CancelFlightButton.SetFocus
cboCancelFlight.Visible = False
Exit Sub
End If
End Sub
The RowSource for cboCancelFlight is as follows:
SELECT DISTINCT tblSelectMainReport.RequestNum
FROM tblSelectMainReport
WHERE (((Nz([RequestNum],0)) Between 1 And 10));