473,503 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Search in subform

Alireza355
86 New Member
Dear all,

I have a main form with a subform in it, showing some data.

I want to have a little form, called "Quick Search" for example, that has a textbox and 3 buttons: Find, Find Next and Close. I have done everything so far, but don't know how to make the "Find" and "Find Next" buttons find what I have typed in the textbox.

I dont want the found text to be highlighted in the subform, because I have read in the internet that this can not be done easily with normal textboxes.

So I guess highlighting the entire record would be fine. something like:

Application.RunCommand acCmdSelectRecord

would be fine for highlighting that row.

But the problem I have is how to find my text in that subform, and how to make that record be pointed out from the rest of the records in the subform and Also, what code or query to use for the "Find Next" button?????

Any help??????
May 7 '09 #1
1 2663
NeoPa
32,557 Recognized Expert Moderator MVP
The code for accessing the records in your form is not form related. This makes handling this job from a separate, pop-up form, more complicated. I would advise instead, having a facility on the subform itself if that's possible.

The procedure(s) to call are :
Expand|Select|Wrap|Line Numbers
  1. DoCmd.FindRecord()
  2. DoCmd.FindNext()
I suggest you look this up in Help to get all the details. How to use the various options and when to use each procedure.

If you must use a separate form, then you'd need to select the subform of the main form and make it the current form before making either of these calls. You can see that there is nothing in the call to specify which object it's dealing with otherwise.
May 12 '09 #2

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

Similar topics

3
3021
by: AW | last post by:
Hi all, I have a form (named Offices) with a subform (named Occupants) that connect with the Master/Child Field "office number". I have a combo box that allows a user to pull up a particular...
9
20260
by: Christopher Koh | last post by:
I will make a form which will search the database (just like google interface) that will look/match for the exact name in the records of a given fieldname. Any suggestions on how to make the code?
1
1653
by: asavu | last post by:
Hello, I'm somewhat new to this, and I definately need some help. I have a db for a small business, and I have a main form, Customer Info, which has a subform Appliance Info, which has a subform...
1
5065
by: jaishu | last post by:
Hi, I have a form with a subform, Both of them are based on a query.the form displays a productid and its details ,and the subform has matching productnames for that productid. Now i have a...
10
2149
by: KiwiGenie | last post by:
I have an unbound form with text and combo boxes for entering search criteria . When Search button is clicked it builds a sql statement and assigns it to the recordsource of a subform. The subform...
0
982
by: sandy21380 | last post by:
I have the following code in my program allowing users to search for entries matching up to five different criteria at once. I changed the form to now contain a subform and would like to allow the...
2
1491
by: Robert Jacobs | last post by:
Please Help! I have read over and over again to go to Allen Browne's website to filter subforms, but I just don't understand it, and I can't get it to work in my situation. Any advice is very...
5
1945
by: Deano | last post by:
Perhaps this has been asked before but there might be some up to date thinking about this. I really need a better search function for my asset register. I allow assets to be entered and tracked...
3
3958
by: suek | last post by:
I have a table with over 4000 records to search upon, and the users don't like a combo box. So what I have been trying to do for the last twelve hours is do some code to get a text box to search. ...
2
1639
by: NerdyGirL | last post by:
Hello, I've read thru numerous post/archives trying to decipher the cause of my problem to no avail. I'm just basically trying to conduct a search by using a form in order to locate data that may...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
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...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.