Art-
Close, but no cigar. You left out the second .Form.
Me.OrderBy = Forms![frmMainMenu]![sfrmVendorMain].Form![sfrmVendorSearch].Form!txtVendors_OrderBy
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jun 8, 2017, at 11:06 PM, Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
John,
I tried it and it worked in one place but not all... I tire it here:
Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = Forms![frmMainMenu]![sfrmVendorMain].Form![sfrmVendorSearch].Form.RecordSource
Me.OrderBy = Forms![frmMainMenu]![sfrmVendorMain].Form![sfrmVendorSearch].txtVendors_OrderBy
Me.OrderByOn = True
DoCmd.Maximize
Me.OrderBy = Forms![frmMainMenu]![sfrmVendorMain].Form![sfrmVendorSearch].txtVendors_OrderBy
Me.OrderByOn = True
DoCmd.Maximize
End Sub
But no good. It bombs on the Me.OrderBy = line. Object Not Supported.
With Warm Regards,
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265 Ext. 130
Fax (605)964-1070
"Anyone who claimed that old age had brought them patience was either lying or senile."
From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, June 6, 2017 2:16 PM
Subject: Re: [MS_AccessPros] Refering to subcontrols
Art-
Try:
Forms![frmMainMenu]![sfrmMessageMain].Form![sfrmMessageSearch].Form.OrderBy
Note that the two subform names must be the names of the CONTROLS on the forms, which is not necessarily the same as the name(s) of the form(s) inside the controls.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jun 6, 2017, at 8:55 PM, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar