473,396 Members | 1,996 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,396 software developers and data experts.

Form called from VBA doesn't show all fields in query

Please be patient with me. I'm a newbie and the LAN Nazi's have blocked this site. This means I can only asked questions from home and, of course, the code for this project is at work.

I'm building an Access db on an XP box. I'm currently working on the search function. I've created a form that allows the user to enter data into one or more of 5 fields allowed for searching. When the user selects the "Search" button the data from this form is inserted into a "SearchRequirements" table and a query is run. The query results are then displayed in a tabular form.

The query was written using the GUI query tool and looks something like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT General.WorkOrderNumber, General.MissionName, General.MissionDate, General,JON, General.MissionCode, General.PIN FROM [General] Where ((General.WorkOrderNumber) LIKE (SearchRequirements.WorkOrderNumber))
  2.  
In my test db I have 34 records. The work order number for all of then starts 7. When I put "7*" into this query all 34 records are returned. When I call the tabular form, "SearchResults", that is based upon this query I get a variable number of records depending upon the length of the form when I last saved it. If, however, I put a break in the code just after calling the form, all 34 records are present.

My first impression was this was a timing issue. So I built a Pause function and called it. I've tried pauses varying from 0.1 seconds to 2 seconds. None of these pauses give all the records. Only the break, or the Stop command, does.

Any idea???
Sep 7 '07 #1
3 1648
MMcCarthy
14,534 Expert Mod 8TB
Can you post the code behind the search button.

As for the LAN Nazi's. Explain to them that you need access to this site for development purposes. If they have some other reason for blocking it please let us know and we'll see what we can do.
Sep 8 '07 #2
It was two forms. But it's a moot point now, unless you want to see what was going on for educational purposes. If so, let me know and I'll post the code.

I solved the problem by a course change. I went to the tutorials and learned about dynamic SQL statements. So I modified my SearchResults form to point to the table instead of the query and put a dynamic filter string into the form as it opens. This gives the desired results.

As for the LAN Nazi's. Their Air Force and don't care what I need for development. It's all, "Just do your job and don't complain about the technology you can't have because you can't have it!" Oh well, it pays the bills.
Sep 10 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
It was two forms. But it's a moot point now, unless you want to see what was going on for educational purposes. If so, let me know and I'll post the code.

I solved the problem by a course change. I went to the tutorials and learned about dynamic SQL statements. So I modified my SearchResults form to point to the table instead of the query and put a dynamic filter string into the form as it opens. This gives the desired results.

As for the LAN Nazi's. Their Air Force and don't care what I need for development. It's all, "Just do your job and don't complain about the technology you can't have because you can't have it!" Oh well, it pays the bills.
Glad you found a solutions.
Sep 10 '07 #4

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

Similar topics

2
by: Simon Pleasants | last post by:
Am something of a newbie at this, so please bear with any stupid questions. I have created a database to track shipments that we import. The information is stored in a table and I have created...
4
by: James | last post by:
Dear group, Can anyone tell me how to do the following? I have a basic list of numbers in a table I want to be able to search these by letting the user type "<10" or ">=50" on a simple form...
2
by: RBohannon | last post by:
I have a report with most fields populated by a query. However, some of the fields are variable in such a way that their values cannot be queried from a table. At present the values for these...
9
by: Tony Williams | last post by:
I have two tables 1.tblmonth which holds two fields txtmonth and txtqtrlabel and 2. tblmain which holds a number of fields but in particular a field called txtqtrlabel2. The two tables are linked...
10
by: raytackett | last post by:
I need to take information from a table, let's say one field is Agent Name and the other field is Agent e-mail address. I need a combo box with all of the agent names in there, and once I choose a...
1
by: meganrobertson22 | last post by:
hi everybody- what is the best way to add data from one form to another? i have 2 tables: person and contract. here are some of the fields. table: person personid (autonumber and primary...
10
by: motessa | last post by:
Hello All, I am new to Access and have been looking for answers to my problem on the internet and have not found it yet. I hope someone can give me a hint. Thanks so much. I have a form...
1
by: bgreenspan | last post by:
Hi Everyone, I'm back for some more expert help. Here's what I am doing and what I tried. My database has entries with Contract Names and Expiry Dates, among other fields. I have a form...
8
by: tess | last post by:
I have: table 1 - tblLeadInfo which includes a salesman ID field table 2 - tbllkpSalesman with all zips in the state and a Salesman assigned to that area. I have a form based on table #1 When...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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,...

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.