473,654 Members | 3,239 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.Run Command acCmdSelectReco rd

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 2676
NeoPa
32,568 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
3027
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 office and see the listing of its occupants, no problem. Next, I tried to create a combo box that would allow users to search for a particular occupant within the subform regardless of which office was selected. However, nothing happens. At least...
9
20309
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
1662
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 Service Call Info... these three forms are linked, and I run into a problem when I try to search through records. I set up a different form where the user can select a customer, after which he can either push a button and using that customer's...
1
5104
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 search on the main form wherein the user enters ( search for) the productid, once they click search button, the form should show that particular prod id and details and subform loaded accordingly with that productid matches...seems simple but how do i...
10
2164
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 has in the footer a textbox that has ="found " & (Count()) & " records matching search criteria" as its controlsource. I want to add to this by including what search criteria has been used to get these results. I don't want it to display anything for...
0
991
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 users to search by fields contained in the subform. The field on the subform that I would like to include in the search is , but just including in the code did not do the trick -the search was not recognizing the subform field . The code is pasted...
2
1503
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 appreciated. I have 2 forms. Mainform=Customers Subform(linked)=Service Requests. The two forms have a one to many relationship (many service requests
5
1962
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 over a period of time. There can be quite similar assets and simply choosing from the combo box is not enough. I need something more sophisticated. How hard is it to get a listing that grows as I type in a search term, character by...
3
3966
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. I am learning fast, but I really don't know how to do it, and would appreciate some help. So far I have got to this: Private Sub btnSearch_Click() Dim strFindLocation As String
2
1644
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 or may not be in one field of an associated table/query. Here's my 3-step process. 1) I click on the name of my Main form (that I've already created along with a subform and query and an click-on command button) and it prompts me with an "Enter...
0
8294
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8494
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8596
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2719
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 we have to send another system
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.