Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Access VBA Combo Box
Access VBA Combo Box
Resolved · High Priority · Version 2003
Access VBA Combo Box
I am trying to duplicate a box used on an old database within a new one and I have set all the parameters to be the same, size etc, but when I try to use the combo box on the form in form view I get the following message:The record source '~sq_cfrm:PartOne~sq_cCombo46' specified on this form or report does not exist
You misspelled the name, or it was deleted or renamed in the current database, or it exists in a different database.
In the Form or Report's Design view, display the property sheet by clicking the Properties button, and then set the RecordSource property to an existing table or query.
When I check this it gives me the correct link to the frm:Searches and when I Debug it has the following code:
Sub Combo46_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[NYCCID] = " & Me![Combo46]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Maybe I am just being stupid but nowhere in my old database was there a recordset called Clone and I cannot work out why it would think there is. Is the use of Clone as a recordset something that I should remember from my training?
Thanks
Nikki
For upcoming training course dates see: Pricing & availability
RE: Access VBA Combo Box
Hi NicolaThanks for your question
RecordsetClone is a property that refers to a copy of the table or query underlying a form. It can be used to to work with the data viewed from a form independently of the form itself.
We do not use this method on the VBA course. We instead use DAO objects to achieve the same aim.
I suggest you try adopting that code here.
If you have any other questions, or need some further pointers please do get back to me
Regards
Stephen
RE: Access VBA Combo Box
Stephen,I will have a look at trying that tomorrow, but have put it down for today in case I punch my screen!
Thanks Very Much
Nikki
|
|
How To Insert, Delete, Format, Hide, Copy And Protect Worksheets In Excel A new workbook contains 3 tabs in the same colour and with standard names. When creating advanced worksheets, you may need more or less tabs with coloured tab names. This article examines tabs and how they can be added, taken away, protected and altered. » Article: Training microsoft excel |
» Forum post: Combo Boxes / Navigation |
» Tip: Copy Previous Record Values |



Course updates

