Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-12-2019, 06:38 AM   #1
YouMust
Newly Registered User
 
Join Date: May 2016
Posts: 101
Thanks: 51
Thanked 1 Time in 1 Post
YouMust is on a distinguished road
onclick open the same form/query

hello again..

I have a form linked to a query.

when the form opens its asks for a part number

it takes the part number and populates the form with a bill of material (a list of parts).

What I'd like is when a part number is clicked on from the list that part number is then passed back to the form/query. that way people can drill down through parts lists without having to manually type in a new part number.


I've gotten the control but im unsure how i pass this back to the form again?
[Forms]![frmBomViewer]![PART]

YouMust is offline   Reply With Quote
Old 11-12-2019, 07:29 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,532
Thanks: 58
Thanked 1,426 Times in 1,407 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: onclick open the same form/query

Hi. My suggestion would be change the query to refer to a form control rather than prompt the user for a parameter. When the user clicks on a part number, you can copy that part number into the form control that the query is using and then requery the form.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
YouMust (11-13-2019)
Old 11-13-2019, 03:11 AM   #3
YouMust
Newly Registered User
 
Join Date: May 2016
Posts: 101
Thanks: 51
Thanked 1 Time in 1 Post
YouMust is on a distinguished road
Re: onclick open the same form/query

thanks so much theDBguy

I've made an input box.

My query is now:
Code:
Like "*" & [Forms]![frmBomViewer]![Searchbox] & "*"
and in the unbound box I put an after update event

Code:
Private Sub SearchBox_AfterUpdate()

frmBomViewer.Requery

End Sub
but cant seem to requery

YouMust is offline   Reply With Quote
Old 11-13-2019, 08:06 AM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,532
Thanks: 58
Thanked 1,426 Times in 1,407 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: onclick open the same form/query

How about?


Code:
Me.Requery
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
YouMust (11-13-2019)
Old 11-13-2019, 08:38 AM   #5
YouMust
Newly Registered User
 
Join Date: May 2016
Posts: 101
Thanks: 51
Thanked 1 Time in 1 Post
YouMust is on a distinguished road
Re: onclick open the same form/query

Perfect!!

do you wear a cape!!?
YouMust is offline   Reply With Quote
Old 11-13-2019, 08:39 AM   #6
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,532
Thanks: 58
Thanked 1,426 Times in 1,407 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: onclick open the same form/query

Quote:
Originally Posted by YouMust View Post
Perfect!!

do you wear a cape!!?
No comment...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 11-14-2019, 01:00 AM   #7
YouMust
Newly Registered User
 
Join Date: May 2016
Posts: 101
Thanks: 51
Thanked 1 Time in 1 Post
YouMust is on a distinguished road
Re: onclick open the same form/query

Is there away to make this update on the fly rather than if i tab out.

Most users will be using touch screen. i could put a button in I guess but it'll be nice if it just updated as it was typed.

Edit:
This would be nice, but i have added a search button and its all working. so no drama



Last edited by YouMust; 11-14-2019 at 02:59 AM.
YouMust is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use onClick event to open query text displayed in form field? joswald Forms 10 10-11-2013 04:36 PM
VBA for OnClick Open the image in a window qnikchen Modules & VBA 6 06-10-2013 07:13 AM
Onclick to open report and filter james_halliwell General 3 05-13-2013 08:46 AM
onclick to open a another form. soundsfishy Forms 3 10-16-2002 02:07 AM




All times are GMT -8. The time now is 04:24 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World