Method or data member not found

Abeladoni

New Member
Joined
Nov 8, 2004
Messages
6
Greetings all!

I've got a problem I'm hoping someone can help out with.

I've got a series of tables that are archived data by year. For example: MyData_2006, MyData_2007 etc.

Now they all use the same exact form to view and edit the data. So what I'm trying to do is create a drop down box that will change the record source of that form based upon what the user chose. So the user will choose the year from the drop down, push the button and the Form will open up with the record source changed to that year.

The problem I'm running into is when it gets to the recordsource line of code I get the error message: Method or data member not found.

When I searched for this on Google it indicates that I was missing the "Microsoft DAO 3.5 (or 3.6) Object Library". However, I'm NOT missing it. It's in my list of available references and is checked. I've got 3.5 & 3.6 available (I've tried them both, but am using 3.6 by default).

So if anyone has any further ideas, I would greatly appreciate it!

-Dale

Below is my code:
Private Sub View_Season_Click()

Dim dbs As Database
Set dbs = CurrentDb
strSeason_Value = Me!Combo4.Column(1)
dbs!Forms!Cost_Sheet.RecordSource = strSeason_Value
DoCmd.OpenForm "Cost_Sheet"

End Sub
 
Hi Vic

I mis-read the question and thought all of the data was in one table.

A

Andrew, According to the original spec in the original question, this data HAS BEEN archived into tables and each table holds one year of data. Are you actually suggesting a UNION query that will read ALL the data from ALL the archived tables, just so the year can be filtered by year?

Maybe an explaination would help here.
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,226,218
Messages
6,189,693
Members
453,563
Latest member
Aswathimsanil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top