TurboDieselOne
Registered User.
- Local time
- Today, 17:01
- Joined
- Jan 16, 2003
- Messages
- 39
This is the Code I have for the Not on List event on my form
Dim Strsql As String, X As Integer
X = MsgBox("Do you want to add this value to the list?", vbYesNo)
If X = vbYes Then
Strsql = "Insert Into tlkupCounty ([County]) values ('" & NewData & "')"
'MsgBox strsql
CurrentDb.Execute Strsql, DB_FAILONERROR
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
What I need to do is change the SQL statement so that I can add to the tlkupCounty the Country as well, which is on this form as a seperate combo the datasource for the [County] is :
SELECT tlkupCounty.County, tlkupCounty.Country FROM tlkupCounty;
but the Country column width is set to 0
Dim Strsql As String, X As Integer
X = MsgBox("Do you want to add this value to the list?", vbYesNo)
If X = vbYes Then
Strsql = "Insert Into tlkupCounty ([County]) values ('" & NewData & "')"
'MsgBox strsql
CurrentDb.Execute Strsql, DB_FAILONERROR
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
What I need to do is change the SQL statement so that I can add to the tlkupCounty the Country as well, which is on this form as a seperate combo the datasource for the [County] is :
SELECT tlkupCounty.County, tlkupCounty.Country FROM tlkupCounty;
but the Country column width is set to 0