Next Inner
-
have a form that adds a new date to a sql database. What i want to do is when the user clicks add a new day, it comes up with a text box to add a new day. When the user tabs to the first feild, i want the lost focus to check the combo box to see if the date is already in the list? Private Sub txtFields_LostFocus(Index As Integer) Dim ifeild As Integer Dim flddate As String flddate = frmCashSheet.cmbDate.Text ifeild = Index If ifeild = 0 Then frmCashSheet.txtFields.Item(0).Text = flddate MsgBox "date has been entered already, Please select a new date" frmCashSheet.txtFields(0).SetFocus Else For Inner = 0 To 32 txtFields(ifeild).BackColor = &HFF& Next Inner calculate End If End Sub
-
have a form that adds a new date to a sql database. What i want to do is when the user clicks add a new day, it comes up with a text box to add a new day. When the user tabs to the first feild, i want the lost focus to check the combo box to see if the date is already in the list? Private Sub txtFields_LostFocus(Index As Integer) Dim ifeild As Integer Dim flddate As String flddate = frmCashSheet.cmbDate.Text ifeild = Index If ifeild = 0 Then frmCashSheet.txtFields.Item(0).Text = flddate MsgBox "date has been entered already, Please select a new date" frmCashSheet.txtFields(0).SetFocus Else For Inner = 0 To 32 txtFields(ifeild).BackColor = &HFF& Next Inner calculate End If End Sub
Private Sub txtFields_LostFocus(Index As Integer) This does not appear to be called from anywhere by a handler and has the wrong parameters.
Private Sub txtFields_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtFields.LostFocus
Index would have to come from reading something but I am not sure what from this example. -
Private Sub txtFields_LostFocus(Index As Integer) This does not appear to be called from anywhere by a handler and has the wrong parameters.
Private Sub txtFields_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtFields.LostFocus
Index would have to come from reading something but I am not sure what from this example.It is correct is he's using VB6.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
have a form that adds a new date to a sql database. What i want to do is when the user clicks add a new day, it comes up with a text box to add a new day. When the user tabs to the first feild, i want the lost focus to check the combo box to see if the date is already in the list? Private Sub txtFields_LostFocus(Index As Integer) Dim ifeild As Integer Dim flddate As String flddate = frmCashSheet.cmbDate.Text ifeild = Index If ifeild = 0 Then frmCashSheet.txtFields.Item(0).Text = flddate MsgBox "date has been entered already, Please select a new date" frmCashSheet.txtFields(0).SetFocus Else For Inner = 0 To 32 txtFields(ifeild).BackColor = &HFF& Next Inner calculate End If End Sub
So, where's the code that goes through each item in the ComboBox items and compares the two??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
It is correct is he's using VB6.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Oops! Sorry did not twig that.