access vba combo box
RH

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Access VBA Combo Box

Access VBA Combo Box

resolvedResolved · High Priority · Version 2003

Nicola has attended:
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course

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

RE: Access VBA Combo Box

Hi Nicola

Thanks 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

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Access tip:

Copy a Previous Record's Values to a New Record

If you often enter the same value in one field of a table, there are two methods to save re-typing the data.

1. Use Ctrl+' (apostrophe) to repeat the value input in the previous record.

2. Change the field's DefaultValue property in Design View to the most commonly used value.

View all Access hints and tips


Server loaded in 0.05 secs.