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

Can i Filter a query in back-end from a front-end textbox

100+
P: 547
I can reference a query in a back-end database with this code in the row source of my list box on the front-end, but can i filter this back-end query from a textbox situated on the front-end form?
Expand|Select|Wrap|Line Numbers
  1. SELECT qrylistpatients1.*
  2. FROM qrylistpatients1 IN 'C:\pisprg\PISData.accdb';
front-end database = pisprg.accdb
the front-end form = Home
front-end textbox = sub-district

the query in backend -
Expand|Select|Wrap|Line Numbers
  1. SELECT qryListPatients.Surname, qryListPatients.Initials, qryListPatients.FirstName, qryListPatients.Gender, qryListPatients.IDNo, tblFacility.FacilityName, qryListPatients.FileNo, qryListPatients.ClientID, tblFacility.[Sub-District]
  2. FROM qryListPatients LEFT JOIN tblFacility ON qryListPatients.Facilityname = tblFacility.FacilityID
  3. ORDER BY qryListPatients.Surname, qryListPatients.Initials;
Any suggestions please?
Apr 22 '14 #1
Share this Question
Share on Google+
1 Reply


zmbd
Expert Mod 5K+
P: 5,397
it is my understanding that if you have a stored query in an access backend datafile, the SQL is first transfered to the local-front-end for parsing and then execution. Rememeber, each installation of Access is acting as its own independant sever at the local level.

Therefor, if the query references a form, it will be looking for that form once loaded and parsed or it will give you the usual generic parameter prompts.

As to if you can then use this as the rowsource, IDK. Please attempt it and let us know what happens (^_^).
Apr 23 '14 #2

Post your reply

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