I have a combobox that pulls a list of techs from my table. This works (thanks to boag2000). I have two questions one of which is not concerning requery.
1) what is the best way to input a "blank" into the combobox as the first entry the user will see when the form opens?
2) I have tried both of these to get the combo box to requery and nothing appears to be happening.
If my user selects a tech from the combobox and then opens the delete tech form but decides to just close the form the requery I think should set the combobox and any textboxes (these are linked to the combobox) back to blank but it doesn't. What am I doing wrong. One last item, is there a better way to delete records from the various tables than what I have listed below?
Private Sub cmdCForm_LostFocus()
Private Sub cmdDTech_Click()
Dim intAnswer As Integer
Dim strsql As String
If Me.NewRecord Then
intAnswer = MsgBox("Are you sure you want to delete this tech " _
& " and their records?", vbQuestion + vbYesNo, "Tech deleted")
If intAnswer = vbNo Then
strsql = "delete * from ctused" & " where id = " & Me.txtID
strsql = "delete * from ctbal" & " where id = " & Me.txtID
strsql = "delete * from ctsubmitted" & " where id = " & Me.txtID
'delete tech from tech table
strsql = "delete * from techs " & " where ID = " & Me.txtID