Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting in a subform?

Status
Not open for further replies.

Kysteratwork

Technical User
Jan 3, 2005
45
LU
Hi All,

I have a subfrm (continuous form) where I would like to create a command button that sorts the entire subform by the text field txtCompany... sounds easy enough, but I don't know how to do that. Is it at all possible in a form?

Thank you in advance for any indication.

Kysteratwork
 
Zameer, it gives me the error message:

Compile Error: Method or data Member not found.

and .subfrmTransactions is highlighted (in Me.subfrmTransactions.SetFocus ). The name is correct, though.

?
 
And this ?
Me!subfrmTransactions.SetFocus

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I believe you are using the command button on the mainform. I tried this and worked perfect.
It is not necessary your subform name and subform control in the main form hold the same name.
Also try
Me!subfrmTransactions.SetFocus

Zameer Abdulla
JVBP MDS
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
Zameer,

Now I get:
Can't find the field subfrmTransaction you refer to in your expression. But if it works fine with you, there must be a mistake somewhere that I haven't seen. I will keep trying!

Thank you for your efforts!

Kysterathome
 
Is subfrmTransactions the name of the control hosting the subform ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV, that was indeed a problem, but now the error message reads:

The command or 'SortAscending'isn't available now.

....

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top