Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Query by form - display results in form

Posted on 2013-02-07
11
Medium Priority
?
284 Views
Last Modified: 2013-02-08
When I hit the search button on my form I get an error. What is causing the error and how do I fix it? See attached database.
FFWS.accdb
0
Comment
Question by:Coaster_brook_trout
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 38865654
You have it all wrong there.
Do you want to use VBA or A macro?
You have Macro Actions in a VBA Function...?


Try it like this:
FFWS-1--2013-02-07.accdb
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865662
In other words by using just a macro as I did above, no VBA code is needed...
0
 

Author Comment

by:Coaster_brook_trout
ID: 38865676
boag2000 how do I see what you did? When I click on your example a bunch of symbols pop up...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Coaster_brook_trout
ID: 38865682
I was trying to do this...http://support.microsoft.com/kb/304428
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865753
<When I click on your example a bunch of symbols pop up... >
Not sure what you are doing then...

I type in "Barry" as the county.
Then I click the button and get this:
results
Try Downloading the sample again and let me know
0
 

Author Comment

by:Coaster_brook_trout
ID: 38865767
That's EXACTLY what I was trying to do. Except I don't know how to download your file. I click on the link and a browser page pops up with all this gibberish. I can't find another place to click or an option that says download or save file...
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38865792
Oh...

That is because the site does not know the .accdb extension...

Right-click on the link and select "Save Link As", and point to a location on your disk.
(for example:, My Documents)
Then you can go to that location and open the file
0
 

Author Comment

by:Coaster_brook_trout
ID: 38867698
Oh geeze boag2000 you are the best, like the best, I love it when you answer my questions!!! Thank you so much!
0
 

Author Closing Comment

by:Coaster_brook_trout
ID: 38867699
Boag2000 is the best!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38868206
<Oh geeze boag2000 you are the best, like the best, I love it when you answer my questions!!! Thank you so much! >
Thanks, But I am only one of the many Experts here.

But give yourself some credit.
You made a valiant try at taking a complex articular and trying to get it to work for your purposes.
Many people would have simply "asked" for a solution, but you sought one out on your own.

The fact that you were able to show me what you did, enabled me to target my solution.
;-)
This is why I always try to post sample files.
Many times you go through all the trouble of following a complex set of steps, ..only to find out that it does not work in the way you expected (or does not work at all!)

But as a bonus, I will also say that you could have created code on the click event of the button that was simply this:
Docmd.OpenQuery "QBF_Query"
See the new sample

Other notes:
You should also have a table of distinct Counties
You also need a table of Distinct Waterbodies
Then a third "Junction" table: CountyWaterbodies, ...to join the two
(I guess the same thing would go for "Species...? and the other tables as well)
This will allow you to build a drop down box on your form to "select" a county (or Waterbody, or whatever), instead of relying on the user to spell it correctly.
But you should perhaps post a separate question on this topic. (Many-To-Many relationships)

In otherwords, before you start designing complex interfaces for your application, make sure the data is properly normalized and related.

;-)

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38868208
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

636 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