• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

Access Form record count differs from Table record count

I have a DB with a table called ‘TestBooking’ to which I have a query called ‘TestBooking Query’
I have a form with the RecordSource as ‘TestBooking Query’
For test purposes I have entered some values into a field called [Works Order No].
(4 records as follows:- “79804”, “79805”, “79806”, “79807”)

I want to the user to enter a number (as string) onto my form.
Then the system finds the record and then the record can be displayed/edited.

The problem:
The form only shows ‘records 1 of 1’ whereas the DB (& therefore query) has 4 records.

This means that if I use the built-in ‘find’ it cannot find any records.
(even the < or > buttons are grayed).

I have also written some VBA event code to find a string within [Works Order No] and even this can’t find any records.

I am fairly new to Access so I must be doing something wrong.

Can anybody help?
0
usatrfe
Asked:
usatrfe
2 Solutions
 
Paul_Harris_FusionCommented:
If this is all test data and not confidential,  maybe you could upload your database file for the experts to have a look at.....
0
 
donaldmaloneyCommented:
Is the form set to use the "query" or table as input?
This is not needed if you are searching to fill a form based on an entered key.
What you should have is a drop down/combo box for the input and Select the item you want then fill the form with the data ( MOdify the Recordsource)
See:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26981371.html

Look at form  frmlToolsLookUpAfterUpdate
I locked the data on this form so it cannot be updated
and see the "AfterUpdate" for Tool_PK
Less code and changes the recordsource.
It will show the last one used when it opens.
0
 
Jeffrey CoachmanCommented:
Then it looks like the forms is opened to display a specific record.

In order for your "Search" to display another "Filtered" record, you will have to remove this filter, then apply the new filter

Try something like this as a start, on a button on the form:

'Clear the old filter
Me.Filter=""
Me.filterOn=False
'Apply the new filter
Me.Filter="[Works Order No]"= &  "'" & me.txtWorksOrderNo & "'"
me.FilterOn=True


JeffCoachman
0
 
usatrfeAuthor Commented:
Sorry about the delay in finalising this question.

My form was open to display a specific record so removing the filter worked but prevented me from displaying data (blank fields) unless I did a search. I added a combobox to make the search more user friendly. I then created a 'default' dummy record that prevented the user from seeing empty boxes when they first use the form.

Thanks for your kind assistance.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now