Expand|Select|Wrap|Line Numbers
- Option Compare Database
- Private Sub Form_Open(Cancel As Integer)
- SetFilter
- End Sub
- Sub SetFilter()
- Dim LSQL As String
- Me.Refresh
- LSQL = "SELECT * FROM AccountCardRegister, AccountCardComments"
- LSQL = LSQL & " WHERE AccountCardRegister.AccountCard = '" & Combo128 & "'"
- Debug.Print LSQL
- Form_Maintain_CardDetails.RecordSource = LSQL
- End Sub
- Private Sub Combo128_AfterUpdate()
- SetFilter
- End Sub
Basically, you select a record using the combo box and all the text boxes I have on the screen populate for that record, including a subform which is a single textbox. Its not getting past the initial openform though!
The status bar details "This recordset is not updatable" when I try to go into the form. No other form does this. Can anyone else?
The full error message is "You cancelled the previous operation".
I've stepped through a few times and its the WHERE clause that is causing the most grief. If I just select *, it all runs through fine, but this doesn't let me whittle down my records by using the combo box.
Thanks!