Just trying to add the selection from a combo box into the dialog prompt/ error catcher message, however need help with my SQL command
Dim x As Integer
Dim NewData As String
Dim strSQL As String
NewData = Me.cmbEquipType.Value()
strSQL = "SELECT tblEquipmentType([EquipTypeName]) FROM tblEquipmentType" & _
" WHERE [tblEquipmentType].EquipTypeID = newData ;"
x = MsgBox("Do you want to add a" & Chr(34) & strSQL & _
Chr(34) & "EquipType to this inspection?", 4, "Exit?")
As you can see at the moment it actually prints to screen the SQL statement
I can get it to print to screen the combo value with
x = MsgBox("Do you want to add a" & Chr(34) & newData & _
Chr(34) & "EquipType to this inspection?", 4, "Exit?")
however because the bound column is the ID which I need for other things I simply need an SQL statement in vb to get the Name
I am fairly good with SQL in stand alone sense however I struggle using SQL statements in VB
Thanks