Go Back   Access World Forums > Microsoft Access Discussion > Macros

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-07-2018, 02:46 PM   #1
The robyn
Newly Registered User
 
Join Date: Mar 2018
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
The robyn is on a distinguished road
Macro to open query based userforum at specific record?

Ok so...i have a form which is based on a query. I would like a command button on my switchboard form which on click opens the form to display a specific record.

I have been able to do this in 03-07 and i think it was by way of prompting user to enter a parameter value [ ]. If no value was entered then the form opened to display all records.

Now using access 2010 and ive tried everything but i still be like !!! Im sure its so simple but this new version of access is taking some getting used to!

Any ideas?

Ps i am not familiar with vb but with clear instructions i would be happy to take a pop at it

The robyn is offline   Reply With Quote
Old 03-07-2018, 02:52 PM   #2
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 31,256
Thanks: 8
Thanked 3,720 Times in 3,663 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: Macro to open query based userforum at specific record?

Is this what you're trying to do?

http://www.baldyweb.com/wherecondition.htm

The same can be done via macro using the wherecondition argument.
__________________
Paul
Microsoft Access MVP

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
Old 03-07-2018, 03:06 PM   #3
The robyn
Newly Registered User
 
Join Date: Mar 2018
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
The robyn is on a distinguished road
Re: Macro to open query based userforum at specific record?

Im a real lay person but yes that sounds about right. My switchboard is basically a standard form that i will populate with command buttons for easy end user navigation.

The query i have retrieves all staff info but does not include those who have left - criteria being leaver date is null.

I have a tabbed form that displays all manner of staff details - one record per employee so i dont think its a continous form?

To keep it simple for the admin using the database i previously had a button on the main switchboard that said "view employee". On click a pop up box prompted for parameter value...a surname was entered and the form opened to display the record relating to the surname.

I have a 4 year absence of use from access so im trying to remember everything but the layout is very different so forgive me if i sound a bit daft!

Would a combo box/list on the switchboard be more suited? They could then select the surname from the list to open the form related to the record selected?

The robyn is offline   Reply With Quote
Old 03-07-2018, 03:58 PM   #4
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 31,256
Thanks: 8
Thanked 3,720 Times in 3,663 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: Macro to open query based userforum at specific record?

Sure, that method could be used with a combo or listbox (as long as the listbox was single select; more code would be required for multiselect).
__________________
Paul
Microsoft Access MVP

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
Old 03-08-2018, 12:52 AM   #5
The robyn
Newly Registered User
 
Join Date: Mar 2018
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
The robyn is on a distinguished road
Re: Macro to open query based userforum at specific record?

Thanks paul.. I'll try combo
The robyn is offline   Reply With Quote
Old 03-08-2018, 10:45 AM   #6
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 31,256
Thanks: 8
Thanked 3,720 Times in 3,663 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: Macro to open query based userforum at specific record?

No problem, post back if you get stuck.

__________________
Paul
Microsoft Access MVP

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy 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
Macro to open form on specific record no longer working Maleficent Macros 1 04-20-2017 06:51 AM
Open a Form to a specific record using a query Maleficent Forms 1 04-17-2017 06:27 AM
Open specific report record based on form record values dbaldwin Modules & VBA 5 04-26-2011 08:54 AM
Open Form Via. Macro w/ Specific Order # andmunn Macros 2 06-23-2009 06:18 AM
Using OpenForm macro to open a subform to a specific record Shell Forms 2 08-24-2006 02:21 PM




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


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

Sponsored Links

How to advertise

Media Kit


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