I am trying to create a search from a form but am having trouble getting data returned.
- I have a combo box, CboTitle Search that I select the criteria from.
- I have a search button, cmdSearch, that is looking through a query of submitted work when clicked.
- I want to compare what is selected in the combo box to the rows in the query and pull all the data in the query for the titles that match.
- I have tried creating a separate query for this process and using the OnClick Event Procedure to run it but I am not getting any results. [SQL Query CODE] - SELECT Created_Submitted_Query.Title, Created_Submitted_Query.[Year Created], Created_Submitted_Query.Submitted, Created_Submitted_Query.[Submitted To], Created_Submitted_Query.Website, Created_Submitted_Query.Accepted, Created_Submitted_Query.Date, Created_Submitted_Query.Type
-
FROM Created_Submitted_Query
-
WHERE ((([Forms]![Records_Search]![CboTitleSearch])=[Created_Submitted_Query].[Title]))
-
GROUP BY Created_Submitted_Query.Title, Created_Submitted_Query.[Year Created], Created_Submitted_Query.Submitted, Created_Submitted_Query.[Submitted To], Created_Submitted_Query.Website, Created_Submitted_Query.Accepted, Created_Submitted_Query.Date, Created_Submitted_Query.Type;
[SQL Query CODE]
Ultimately I would like to have the results appear as a sub-form on the bottom half of my search form instead of opening another screen. However, I can fight that battle later if necessary.
Unfortunately for me I am not a programmer and am just trying to teach myself how to do some things. Any help on this would be greatly appreciated.
Thanks,
Doug
2 1392
Hello,
I actually had the query, Records Search Query, retunring data now but only when I ran it direclty and not by using the command button. Here is the code for the command button. [Command Button Code] - Private Sub CmdSearch_Click()
-
On Error GoTo Err_CmdSearch_Click
-
-
Dim stDocName As String
-
-
stDocName = "Records Search Query"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
-
-
Exit_CmdSearch_Click:
-
Exit Sub
-
-
Err_CmdSearch_Click:
-
MsgBox Err.Description
-
Resume Exit_CmdSearch_Click
-
-
End Sub
[Command Button Code]
Do I need an IF statement of soemthing in the code above? After testing it in the form again I started receiving no returns regardless of how I tried it. If I close Access and come back in I am again able to receive data back after getting prompted with a dialog box to enter a title.
NeoPa 32,556
Recognized Expert Moderator MVP
Doug, Your question seems a little complex. Check out Example Filtering on a Form and let us know if you're still having problems. Then, if we need to, we can go into more detail.
PS. Note the use of the [ CODE ] tags. They're required to show the code properly.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Harvey |
last post by:
Hi,
I try to write an asp query form that lets client search any text-string and
display all pages in my web server that contain the text. I have IIS 6.0 on a
server 2003. The MSDN site says...
|
by: Brian D |
last post by:
I have been searching for a while to find an answer to this and I must
be searching on the wrong keywords.
Below is a snippet of my form. There are other form items on it, but I
need to submit...
|
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?
|
by: jeff29_b |
last post by:
I am having a strange problem on a web form. I have an image button
with an OnClick event handler. When I click the image the event isn't
being called in the code behind when browsing in firefox....
|
by: jodyblau |
last post by:
I am trying to change the recordset that my form uses, but when I
requery my form, all of the textboxes display #Name?
Here is what I am trying to do:
The user enters a search term in a textbox...
| |
by: Howie |
last post by:
Hi all. Hope you can help.
I have created a form to edit existing records. I want to do two
things:
1/ When the form opens, I want it to give a search field
(searching on a string) which then...
|
by: TheDataGuy |
last post by:
Using MS ACCESS 2002
I developed a FORM, and within that FORM, I created and added a SEARCH BUTTON, and then I created a SUB-FORM, so that when an the END USER clicks on the FORM it will POP-UP...
|
by: NMarks |
last post by:
Hello all,
I have created a database for my work that stores information for keys/locks, doors and employees.
Specifically the database contains all the information of our lock system, which...
|
by: Michiel Rapati-Kekkonen |
last post by:
I have a continuous form, with 22 rows on display.
I make a change in some row and have the form requeried.
(I have to, because the query on which the form is based is not updateable,
and the...
|
by: Kassimu |
last post by:
Hi guys out there,
There is this database Iam creating, I have a table with 40 fields among which there are Date/time, Text, Number, Memo and Yes/No fields and I have created the form bound to that...
|
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...
| |
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,...
|
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...
|
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...
|
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,...
|
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: 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...
| |
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |