473,408 Members | 2,402 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,408 software developers and data experts.

Help with "Search Form" please...

6
Hello everyone,

I am trying to finish an application and I have been strugling with the last two forms.

What I am trying to do is create a two search forms with unbound text boxes and a subform for the results.

I have looked all over the place for examples and I have not had any luck finding any that match what I need. The examples that I have found, I have played with and nothing seems to work.

I am using Access 2003 (Format 2000)

Tables:
tblFCR: ID, Date, Last Name, First Name, Middle, DOB, Case #, Race, Height, Weight, Hair, Marks, Reason, Location, Cooperative, Comments, AKA, Gang Affiliation, and Status.

tblCaseNumber: ID, Date, Case #, Officer, Officer #, Incident, and Description.

Any help would be appreciated.

Ron
Dec 5 '06 #1
4 1666
MMcCarthy
14,534 Expert Mod 8TB
Hello everyone,

I am trying to finish an application and I have been strugling with the last two forms.

What I am trying to do is create a two search forms with unbound text boxes and a subform for the results.

I have looked all over the place for examples and I have not had any luck finding any that match what I need. The examples that I have found, I have played with and nothing seems to work.

I am using Access 2003 (Format 2000)

Tables:
tblFCR: ID, Date, Last Name, First Name, Middle, DOB, Case #, Race, Height, Weight, Hair, Marks, Reason, Location, Cooperative, Comments, AKA, Gang Affiliation, and Status.

tblCaseNumber: ID, Date, Case #, Officer, Officer #, Incident, and Description.

Any help would be appreciated.

Ron
You need to apply a filter presumably behind the click event of a button (cmdSearch)

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdSearch_Click()
  2.  
  3.    Me.SubformObjectName.Form.Filter = "[FieldName]=" & Me.textBoxName
  4.    Me.SubformObjectName.Form.Requery
  5.  
  6. End Sub
  7.  
Note: SubformObjectName is not always the name of the subform itself. To find the name click on the frame around the subform in main form view and open the properties. Under the Other tab check the value in the Name property.

Mary
Dec 5 '06 #2
NeoPa
32,556 Expert Mod 16PB
Subforms are always difficult to deal with.
Do you need subforms for your situation?
Perhaps a form with two unbound ComboBoxes would work for you.
The principle would be the same but referencing controls simpler.
What are the two items you would like to search on?
Last question, what field(s) do your two tables link on?
Dec 5 '06 #3
Ron S
6
Subforms are always difficult to deal with.
Do you need subforms for your situation?
Perhaps a form with two unbound ComboBoxes would work for you.
The principle would be the same but referencing controls simpler.
What are the two items you would like to search on?
Last question, what field(s) do your two tables link on?
This is what I have had to do thus far..

To make things easier for the end user, I have created a tabbed form. The first two tabs are for data entry and each have two subforms, the first is for data entry and the second is for viewing/selecting the records.

The last two tab's contain the text boxes and another subform for the results.

I would attach this application for you to look at but I was forced to import all of our past data from our old db (Paradox 3.5) that was starting to crash.

Below is a pic of the search form that I am working with.



Thankyou again for your help
Dec 6 '06 #4
NeoPa
32,556 Expert Mod 16PB
Ron,

I can't help in any detailed way as I don't know how the tables are linked.
For the concept though, you need to determine in your code what fields the operator wants to select on (see which have data entered) then build up a WHERE clause in your SQL string which reflects them all in the format
Expand|Select|Wrap|Line Numbers
  1. WHERE (([YourDate=#11/25/2006#) AND (Next test) AND (Last test))
If you want the SQL for the earlier part (SELECT... FROM... ) then an easy way to create this is to design a query in the design grid then switch to SQL view and copy it across to your code.
Dec 6 '06 #5

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

Similar topics

2
by: Mindful_Spirit | last post by:
I'm trying to set up a basic email feed back form like this, and was wondering about some basic configuration settings. I have used code from this website. I have it working just fine. I'm...
0
by: Tallgeese | last post by:
We developed an in-process COM object for our own application. A toolbar button is used to activate the COM object. But when the COM object loaded, the HTML help hang when clicking the "List...
3
by: screenwriter776 | last post by:
Hi, folks - Perhaps you could help me with a search form I am building. I have a table with a field in it. I want to return dates inside two parameters the user enters into a search form:...
2
by: Parasyke | last post by:
Please help.... I have a form that I successfully add records to that I want to copy and turn into a form for editing records from that same table (It is imperitive that it be done this way, rather...
6
by: KiwiGenie | last post by:
Hi..I am trying to make a search form. I am fairly new to access and could well be looking at it completely wrong. I have an unbound form with textboxes in the header for entering different search...
4
by: rempit | last post by:
In 1 form..have 2 "DIV".. "DIV" one is for SEARCH.. "DIV" two is for showing the RESULT from Database of "DIV" one Button.. Everything in one page.. Anyone can help me please..
4
by: mpatharkar | last post by:
Hi all, I wrote a script to search a pattern in input file and if pattern does not found in input file ,print that pattern in to output file. The input file is...
4
by: robertallenpayne | last post by:
I have been asked to develop an application in Access for work. This application must have a simple user interface because the folks using it are not "database people" - their words, not mine. ...
1
by: Nour469 | last post by:
Hello, I have a problem when I run search, I have fields for: name, clientID and phoneNo. When a client calls I need to find them in the database, they might give me the name and it might not...
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: 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:
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
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...
0
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
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
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
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...

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.