473,394 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Display Query Results in Subform.

Hello everyone.

I currently have a database with 2 main forms. One is the main screen, second is the search form. I have built the query with this Criteria: Like "*" & [Forms]![ClientSearchF]![FirstName] & "*"

When searching, this brings up results fine. I need these results to appear in a subform located on the same form when clicking the button I've set to run the query. I'm just needing to know how I would display the results without any VBA coding.

Any help would be fantastic, I'm kind of new to this.
Jun 2 '17 #1

✓ answered by NeoPa

JForbes is absolutely right. As an inexperienced developer you may well think of it as running the query when you click the button, but the query is already run when the main form is opened. All you really need at this point is for the subform form (A SubForm is actually just the control that another form is contained in.) to be requeried. At which point it will be done with the existing parameters, which in your case means reflecting the currently selected name to filter on.

2 3337
jforbes
1,107 Expert 1GB
Unless there is something I'm missing, create a SubForm and base it on the same Query you have your MainForm based on and it should work. You may need to Requery your SubForm when you change the Criteria.
Jun 2 '17 #2
NeoPa
32,556 Expert Mod 16PB
JForbes is absolutely right. As an inexperienced developer you may well think of it as running the query when you click the button, but the query is already run when the main form is opened. All you really need at this point is for the subform form (A SubForm is actually just the control that another form is contained in.) to be requeried. At which point it will be done with the existing parameters, which in your case means reflecting the currently selected name to filter on.
Jun 2 '17 #3

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

Similar topics

3
by: William Wisnieski | last post by:
Hello Everyone, Access 2000, I have a main unbound form with a bound datasheet subform . The subform is bound to a query that returns records based on criteria in the main form. The user...
9
by: Kelii | last post by:
I've been trying to get this piece to work for a few hours, but have given up. I hope someone out there can help, I think the issue is relatively straightforward, but being a novice, I'm stumped....
2
by: davkohne | last post by:
I have two forms a main and sub. On the main form, I want to select a given set of criteria (i.e., "Project"), which pulls from a query and udpates a report number at the same time. I want to...
1
by: aaronkm | last post by:
Hello thescripts and well met. I've recently been handed a new duty and have the joy of 'crash coursing' MS Access. Things are working well but I've ran into a problem that I can't seem to find...
1
by: igor221189 | last post by:
Hello everyone. I have Access 2000 database which holds student records in the school.It stores subject grades for each student.In the 'Student Grade Form', I would like to search student surname...
16
by: dougmeece | last post by:
Good day everyone, I have a database with 2 main forms. The first form is used to add records to the database and contains a command button that opens the 2nd form for records searching. On...
4
by: dougmeece | last post by:
Good Morning again everyone, I am having trouble understanding how to display the results from my query in a subform instead of it opening a separate window. I have a form that queries a...
4
by: kstevens | last post by:
(Yes... i capitalized the S on purpose) I didnt know before today that dlookup only found the first result. I am actually trying to display the results of a query in a report, but there are...
8
by: Erik Pen | last post by:
My main form has several subforms which display the results of queries. I want to display a message in a subform when it's query is empty indicating that there are no records meeting the form's...
3
by: Rob Wells | last post by:
Hi. I have a form with 5 buttons, each of which runs a slightly different query against the same table. I want to be able to display the query reults in a subform so that the user can click an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.