Im struggling to pass a form value to a public sub sqlstring, when I reference the form directly, it works...
Expand|Select|Wrap|Line Numbers
- Public Sub CalDeleteTopSheet(strCal As String)
- Dim strSqlDelete As String
- strSqlDelete = "DELETE " & strCal & ".Summary" & vbCrLf & _
- "FROM " & strCal & vbCrLf & _
- "WHERE (((" & strCal & ".Summary)= [Forms]![NewTopSheet]![txtCustomerID] ));"
- End Sub
Expand|Select|Wrap|Line Numbers
- Public Sub CalDeleteTopSheet(strCal As String, strID As String)
- Dim strSqlDelete As String
- strSqlDelete = "DELETE " & strCal & ".Summary" & vbCrLf & _
- "FROM " & strCal & vbCrLf & _
- "WHERE (((" & strCal & ".Summary)= " & strID & "));"
- End Sub
The table field thats being referenced for deletion strCal.Summary is in long text, do I need to convert strID to long text, not sure how to do it.
Thank you so much in advance
Cheers Eddie