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

x
?
Solved

Access form start problem

Posted on 2012-03-21
6
Medium Priority
?
400 Views
Last Modified: 2012-06-27
I have an Access 2010 database.  The primary form was named Main.  Due to upcoming enhancements I changed the name of the form to Cards.  I have gone through all the VB code and changed references to Main to Cards.  There are 6 unbound fields on the form that are used as search arguments.

When I start the application I get 6 Enter Parameter Value boxes.  One for each of the search fields.  One of the names being displayed is Forms!Main!txtSearchM.  txtSearchM is one of the search fields on the form.

How to I change the value being asked for to Forms!Cards!txtSearchM which should then stop the Enter Parameter Value boxes from being displayed on startup?
0
Comment
Question by:IBMJunkman
  • 3
  • 2
6 Comments
 
LVL 49

Accepted Solution

by:
Dale Fye earned 800 total points
ID: 37747744
The key is finding where the Main form textboxes are referenced in your application.  This can be extremely difficult and time consuming, as they can be embedded in queries, in properties of controls, and what not.

The best tool I've found for finding these references is Rick Fishers "Find and Replace"
0
 
LVL 31

Expert Comment

by:hnasr
ID: 37747973
Place a break point in the code of the search button.
Run the code and step to the lines where it builds the search criteria.
Change the names as required.
0
 

Author Closing Comment

by:IBMJunkman
ID: 37748005
Tool worked great.  It was staring me in the face!  There was a query called qrySearch that had the form name hard coded.

Many thanks.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:IBMJunkman
ID: 37748636
I was getting the popup boxes even before the form opened.  No code was being executed yet. I don't understand why the query named qrySearch was being activated before the form loaded.  It could have been Access doing some kind of preliminary error checking.
0
 
LVL 49

Expert Comment

by:Dale Fye
ID: 37748729
Do you have an Autoexec macro?

Or another startup form that might have code that calls the query?
0
 

Author Comment

by:IBMJunkman
ID: 37753570
There is a subform on the main form.  Its record source was the query in question.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

963 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