In the following code I always receive runtime error 3027 as you can see I clearly have a checkbox that turns the database readonly to false but everytime I try to change a record I receive this error can someone please help me.
Option Explicit
Dim reply As String
Dim EnhCbo As New enhCombo
Private Sub Check1_Click()
If Check1.Value = vbChecked Then
Data2.ReadOnly = False
End If
End Sub
Private Sub Command1_Click()
Data2.Recordset.AddNew
Data2.Recordset.Update
End Sub
Private Sub DBCombo2_Change()
DBCombo2.Text = UCase(DBCombo2.Text)
End Sub
Private Sub dbcombo2_KeyPress(KeyAscii As Integer)
EnhCbo.TextSearch KeyAscii
KeyAscii = 0
End Sub
Private Sub cboZipCode_Change()
'Set Data control to Data2 instead of Zipcode code _
to ensure that recordset will read complete record.
ZipCode.RecordSource = _
"SELECT * FROM ZipCheck WHERE ZipCode='" & _
cboZipcode.Text & "'"
ZipCode.Refresh
End Sub
Private Sub cboZipCode_Click()
ZipCode.RecordSource = _
"SELECT * FROM ZipCheck WHERE Zipcode='" & _
cboZipcode.Text & "'"
ZipCode.Refresh
End Sub
Private Sub cboZipcode_GotFocus()
With cboZipcode
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
Thanks a billion
Option Explicit
Dim reply As String
Dim EnhCbo As New enhCombo
Private Sub Check1_Click()
If Check1.Value = vbChecked Then
Data2.ReadOnly = False
End If
End Sub
Private Sub Command1_Click()
Data2.Recordset.AddNew
Data2.Recordset.Update
End Sub
Private Sub DBCombo2_Change()
DBCombo2.Text = UCase(DBCombo2.Text)
End Sub
Private Sub dbcombo2_KeyPress(KeyAscii As Integer)
EnhCbo.TextSearch KeyAscii
KeyAscii = 0
End Sub
Private Sub cboZipCode_Change()
'Set Data control to Data2 instead of Zipcode code _
to ensure that recordset will read complete record.
ZipCode.RecordSource = _
"SELECT * FROM ZipCheck WHERE ZipCode='" & _
cboZipcode.Text & "'"
ZipCode.Refresh
End Sub
Private Sub cboZipCode_Click()
ZipCode.RecordSource = _
"SELECT * FROM ZipCheck WHERE Zipcode='" & _
cboZipcode.Text & "'"
ZipCode.Refresh
End Sub
Private Sub cboZipcode_GotFocus()
With cboZipcode
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
Thanks a billion