Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

get Query From Button Pressing

Posted on 2013-01-15
16
Medium Priority
?
275 Views
Last Modified: 2013-01-15
Hello,
Trying to do the following
When I tyoe in some string in the textbox, and press search, it should show the filtered query results. It not refreshing when I am pressing the button. Please assist
Thank you
R
finalTestPlease.zip
0
Comment
Question by:Rayne
  • 11
  • 4
16 Comments
 

Author Comment

by:Rayne
ID: 38780173
check form1 Thank you
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38780178
It looks like the out put is correct to me - its showing ALL records that contain your search string in the ship name.

If you want to show DISTINCT results, change your query's SQL view to:

SELECT DISTINCT tblSource.[Ship Name]
FROM tblSource
WHERE (((tblSource.[Ship Name]) Like "*" & [Forms]![Form1]![myShipName] & "*"));

Open in new window


If that doesnt help, please let us know what is wrong with the output and what your expected results are.
0
 

Author Comment

by:Rayne
ID: 38780218
Hello,

Double click on Form1
Entered “Jones”
Clicked “Search” button
Results shows Everything!! All 66 records

I am not sure if that’s filtering correctly by “Jones”


If I enter in Jones, it should pull all the rows that has jones in that field
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 38780233
ttest this


open the form Form1 and type a value in the textbox, then click on the button
finalTestPlease.accdb
0
 

Author Comment

by:Rayne
ID: 38780238
you need to zip it and attach...i am getting all wierd values in the browser when I open it
0
 

Author Comment

by:Rayne
ID: 38780243
no need to zip, got it
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 38780250
better use this one
finalTestPleaseRev.accdb
0
 

Author Comment

by:Rayne
ID: 38780258
This works Great, Can you explain me the steps, Capricorn. I am touching access after 5 years. Thank you
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 38780261
see the codes in the click event of the button.

what steps you want to know?
0
 

Author Comment

by:Rayne
ID: 38780288
How did you set up the  subFrom “frmSource” – the steps
Thank you
0
 

Author Comment

by:Rayne
ID: 38780292
how does the sbuform looks up values from the main form ? like setting the data
0
 

Author Comment

by:Rayne
ID: 38780294
filtered data
0
 

Author Comment

by:Rayne
ID: 38780305
I see this for it but not sure what means
showIt.png
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 38780330
<How did you set up the  subFrom “frmSource” – the steps >

select the table then Create Form > datasheet
save the form

the filtering is done by the codes in the click event of the button
0
 

Author Comment

by:Rayne
ID: 38780340
Perfection to the Ultimate

Thanks Capricorn :)
0
 

Author Comment

by:Rayne
ID: 38780608
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question