473,503 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to open a search from from another form, pre-filtering the data...

38 New Member
*above I meant to say 'search form, from'
I am wondering if it is possible to open a search form from another form (onclick of any record in a text box), pre-filtering the data in the search to relate to the originally clicked record... ie.
At the moment I am implementing a code library, the two main forms are frm001_CodeSearch which enables the user to filter what code they can see. The second is frm002_Categories which consists of categories which the different code samples come under. On the click of a category I want frm001_CodeSearch to open and be pre-filtered, showing only code under that category.

Is this possible?

Any replies and pointers in the right direction are appreciated!

Cheers,
Rebecca
Aug 31 '10 #1
5 1439
Oralloy
988 Recognized Expert Contributor
Yes, it is.

Open the form, and then set the [Record Source] or [Filter] attribute.
Aug 31 '10 #2
Rebecca McCallan
38 New Member
frm002 already has a record source, as does frm001
Which form should the filter attribute be set on and what to exactly?

Thanks for the reply

Rebecca
Sep 1 '10 #3
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Hi Rebecca.
Assumming that each code is assigned to a category by a field ID_Category and that field is a number field you could do such:

Expand|Select|Wrap|Line Numbers
  1. docmd.openform "frm001_CodeSearch ",,,"ID_Category=" & me.tb_Category
where tb_Category shall be a textbox (or combobox) on your frm_002, containing the ID_Category.

I dont know your level of code expertise, so if you require more assistance, please feel free to ask for it.
Sep 1 '10 #4
Rebecca McCallan
38 New Member
Thanks for your help but I've managed to do it in a different way now, by controlling the filter on the other form instead.

Thanks anyway!

Rebecca
Sep 1 '10 #5
Oralloy
988 Recognized Expert Contributor
Just got in and I saw the continued thread.

Glad you figured it out, Rebecca.

Cheers!
Sep 1 '10 #6

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

Similar topics

1
1388
by: Alexandre Jaquet | last post by:
Hi, I want to do a search from my opened popup and print the result to my parent window. I know how can I with a link open a new page in the parent window but I need to retrieve my form...
1
5840
by: Aftershock | last post by:
I have looked on the groups but can't seem to find an answer. I have a parameter query that uses a form for its input. This form then opens up a search result form based on the query. It is from...
5
2720
by: elieli_132 | last post by:
Hi, My problem is the following: Made changes to code in form and closed the form. Now unable to open / design the form. - Tried copying and pasting - the new one does not open /display....
1
2950
by: 4004 | last post by:
I would like to open a columnar form (so I can see all the details) from a datasheet form (so I can see what is there) but keep the same recordset and current record. I can do the recordset set...
0
1190
by: dhowell | last post by:
I have a form which has 2 subforms. When I do a search by form and search for things in the main forms fields, the search works. When I try to search for things in the subform fields, the...
2
1993
by: Eli | last post by:
Hello, we are developing a project in which we needed to integrate code developed in Foxpro with code developed in.Net. Currently we can open .Net forms from VFP, but we do not have been able to...
13
6260
by: lightning | last post by:
I have a search form that returns records to another form, rather than a table. Here are my questions: 1) Is it possible to export the form results (as opposed to query results) to CSV? I've been...
24
5044
thisisntwally
by: thisisntwally | last post by:
I've created a button in formA which updates the table in question, but i'd like to have an option to update and open the same record in form2 (different datafields are being entered so i don't...
7
2421
by: Adrian | last post by:
Why does std::strings find search from the begining of the string when pos >= (std::string::npos-3) I cant find anything in the standard that says what find should do if pos==npos in find I...
1
1238
by: Solid | last post by:
Ok ill make this easy. lets say I have to tables "users" "computers" and they are related. Now I have a form where I want to be able to type a userID in a textbox and click a button and it will...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7074
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
7322
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
6982
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
7451
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
5572
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,...
0
3161
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
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
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 ...

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.