Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

combo form filter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ljg08 - 20 May 2008 15:58 GMT
Can anyone help with this issue please

I have a form to list clients. On the form I have a combo box with a list of
events

I want the users  to select an event from the combo box and filter the fom
data to list just the clients interested in this event.

I have a text box on the form [txteventID] which gets the value of the combo
selection

Private Sub cboevent_AfterUpdate()
Me.txteventlID = Me.cboevent
End Sub

and have tried :

SELECT tblcontact.userID, tblcontact.eventlID, tblcontact.contact_last,
tblcontact.contact_first
FROM tblcontact
WHERE (((tblcontact.referalID)=[Forms]![frmEvents]![txteventlID]));

Whilts the value fills the text box the data is not filtered?
Douglas J. Steele - 20 May 2008 17:10 GMT
If the SQL you're showing is the RecordSource of your form, you need to
requery the form:

Private Sub cboevent_AfterUpdate()
 Me.txteventlID = Me.cboevent
 Me.Requery
End Sub

I don't see the point of the text box, though, to be honest, Why not simply
refer to the combo box in your SQL? (You'd still need the requery)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Can anyone help with this issue please
>
[quoted text clipped - 19 lines]
>
> Whilts the value fills the text box the data is not filtered?
lez - 20 May 2008 19:13 GMT
Cheers, Thanks for that Douglas..doh....I knew it would be something simple.

I have taken the text box out now. I only had that their to act as a source,
and make sure the value was being passed.

Many thanks

> If the SQL you're showing is the RecordSource of your form, you need to
> requery the form:
[quoted text clipped - 30 lines]
>>
>> Whilts the value fills the text box the data is not filtered?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.