473,569 Members | 2,762 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_CodeSear ch which enables the user to filter what code they can see. The second is frm002_Categori es which consists of categories which the different code samples come under. On the click of a category I want frm001_CodeSear ch 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 1443
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
1395
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 values before to send it to the parent window I call a function from my search button :
1
5848
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 this form that I want to print via a report all of the returned records shown on the form. I can print off a single current record shown in the...
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. - Tried compacting / repairing but same situation.
1
2955
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 part (stlinkcriteria) - but how do I have the new form open on the record that was current in the datasheet form? I don't want to filter to the...
0
1196
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 searches don't work..... What am I doing wrong?
2
1997
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 open a VFP form from.Net. Is it possible? how? -- Best regards Eli
13
6275
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 successful at exporting a table of results before, but not a form. 2) If so, can this be done via macro? 3) If a macro is possible, can the...
24
5057
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 think the DoCmd.openForm "form2", , , "=" & Me. approach will work). Is there anyway i can use the .bookmark property to open the new form? ...
7
2426
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 tried it on a few platforms (all with gcc unfortunaley) and its seems to be consistent. Adrian
1
1241
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 search the "users" table for the userID and populate the form (which has other textboxes) with information that corresponds to that userID from both...
0
7694
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7609
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...
0
7921
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. ...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
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...
0
5217
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...
0
3651
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.