problem using navigation form (1 Viewer)

IannWard

Registered User.
Local time
Today, 15:18
Joined
Feb 19, 2015
Messages
30
Hi All

I' a newbie to access and need help with a problem.
I have a search for that runs a query to list info related to a serial number, this works fine when opened on its own. The problem I have is when I insert it into a navigation form it comes up with an error when hitting search. the error is as follows.

Error.JPG

I know this is probably something simple, but as a newbie, its annoying.

Thanks in advance

Iann
 

JHB

Have been here a while
Local time
Today, 16:18
Joined
Jun 17, 2012
Messages
7,732
..
I have a search for that runs a query ...
Where do you have that and what exactly do you have?
..
when hitting search. the error is as follows.
How do you hit search, (with a hammer), or do you mean clicking a button with some code behind, (if code then show the code)?
We can't see what you've created and we can't read minds, so you must be much more specific!
 

IannWard

Registered User.
Local time
Today, 15:18
Joined
Feb 19, 2015
Messages
30
Ok JHB, i guess i should have attached more info. I have attached the database in question for your reference. when, its still work in progress. Open the navigation form, when open you get the 'Allocate Serial Numbers' subform, from here I can search for info relating to a serial number by entering the serial number in the text box and clicking search, this populates the form and the subform below it. My problem is that since I inserted this in to the subform under the heading 'Device Allocation' I get the error 'Enter parameter Value', I know this is a parent form/sub form problem, because when I open the 'SerialNumberQuery' form on its own, the search function works ok, but I just can't figure out where and what needs changing. I may also add subforms to existing subforms, so help with this is also welcome. Hope this is enough info.

Many Thanks

Iann
 

Attachments

  • TestDatabase.accdb
    692 KB · Views: 71

JHB

Have been here a while
Local time
Today, 16:18
Joined
Jun 17, 2012
Messages
7,732
I've made some change to your database, now it should work, (database attached).
 

Attachments

  • TestDatabase1.accdb
    524 KB · Views: 65

IannWard

Registered User.
Local time
Today, 15:18
Joined
Feb 19, 2015
Messages
30
Thanks JHB

I see you added some code to the search button..... Is that all you did?

Iann
 

JHB

Have been here a while
Local time
Today, 16:18
Joined
Jun 17, 2012
Messages
7,732
Thanks JHB

I see you added some code to the search button..... Is that all you did?

Iann
I skipped the Macro you had, and add the code to the Click Event, (the code below), yes it was all.
I don't like when people use "Forms....." when it is not necessary, it is overly sensitive if you change the form names, etc., or as you did put the form into another form, it is to difficult to maintain.
Code:
Private Sub Command11_Click()
  Me.Filter = "[SerialNumber] Like '*" & Me![Text9] & "*'"
  Me.FilterOn = True
End Sub
I don't either like Macros!! :D
 

Users who are viewing this thread

Top Bottom