By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,761 Members | 1,879 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,761 IT Pros & Developers. It's quick & easy.

Setting Recordsource of a SubForm on a Tab control

P: 1
I've read and tried implementing, I believe, most of the simular topics/examples for my issue and I am still getting nowhere...

I am trying to set a SubForm.RecordSource which is on a TabControl.Page(1) with a sql string. When a user selects from a ComboBox on the tab (tbBudget) I want to pass the value from the ComboBox to a routine and create a sql string (works fine) to pass as the new RecordSource.

Here are the particulars:

Main Form: [F_RSPO Purchase Orders]
SubForm: [Fs_Budget] residing on a TabControl
TabControl: tbMain
Tab: tbBudget ...Page(1)

The code I am using:

Forms![F_RSPO Purchase Orders]![Fs_Budget].Form.RecordSource = sqlString

Which returns the error: Run-time error '24665'
Microsoft Access can't find the field 'Fs_budget' referred to in your expression.

** As I understand the TabControl ref is not relevant?

Any suggestions would be greatly appreciated.
Jun 29 '12 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,489
It looks like FS_Budget is not the name of your Subform control.

Check out Referring to Items on a Sub-Form.

The tab control is no part of the reference to the sub-form. That is correct.
Jun 30 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.