BBlu
asked on
Trying to get form/subform combination to work
I posted a question a while ago, but never really got it resolved:
https://www.experts-exchange.com/questions/26846767/Form-and-Subforms.html
I probably failed to give enough information and clarification, so I'll try again.
I am trying to find an easy way for our Accounting team to report to our Sales Manager all of the expenses we incur. He can then assign each expense to a particular Account. I have the first part down, where Iink, via QODBC, to Quickbooks via an Access DB, then create/append a table in another database. I take one more minor step in a query where I reduce the specific detailed accounts to a general category. (For example, instead of having Travel:Meals, Travel:Lodging, etc., I just map them all to "Travel")
Okay, so my goal is have two separate subforms on one page (or one if that's possible). I want the user to be able to scroll through a datasheet view of the query, which lists all of the records, but adds the more general category instead of using the account name/number used by Finance & Accounting. When the user selects a record, I want the other form to show in form view the same record from the original table. He can then edit a field, adding the account number to which we'll assign this expense.
It was suggested that I used the following code in the first subform, which I assumed was the datasheet one, but I could have been wrong.
I'm getting an error: 2465 Application-defined or object-defined error
Screenshot Attached.
Can someone walk me through what I might be doing wrong?
https://www.experts-exchange.com/questions/26846767/Form-and-Subforms.html
I probably failed to give enough information and clarification, so I'll try again.
I am trying to find an easy way for our Accounting team to report to our Sales Manager all of the expenses we incur. He can then assign each expense to a particular Account. I have the first part down, where Iink, via QODBC, to Quickbooks via an Access DB, then create/append a table in another database. I take one more minor step in a query where I reduce the specific detailed accounts to a general category. (For example, instead of having Travel:Meals, Travel:Lodging, etc., I just map them all to "Travel")
Okay, so my goal is have two separate subforms on one page (or one if that's possible). I want the user to be able to scroll through a datasheet view of the query, which lists all of the records, but adds the more general category instead of using the account name/number used by Finance & Accounting. When the user selects a record, I want the other form to show in form view the same record from the original table. He can then edit a field, adding the account number to which we'll assign this expense.
It was suggested that I used the following code in the first subform, which I assumed was the datasheet one, but I could have been wrong.
Private Sub Form_Current()
Dim rst As DAO.Recordset
Set rst = Me.Parent.Subform_OrigExpnes_a.Form.RecordsetClone
rst.FindFirst "txnLineID='" & Me.TxnLineID & "'"
If Not rst.NoMatch Then Me.Parent.Subform_OrigExpnes_a.Form.Bookmark = rst.Bookmark
End Sub
I'm getting an error: 2465 Application-defined or object-defined error
Screenshot Attached.
Can someone walk me through what I might be doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Unfortunately I can't be any more specific to your needs since you have not given use any detail about your database.
Let me know if an example would help.
Let me know if an example would help.
ASKER