Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-13-2019, 11:19 AM   #1
kvnd
Newly Registered User
 
Join Date: Oct 2018
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
kvnd is on a distinguished road
Simple issue regarding opening a form to a specific record, how to fix?

I have a continuous form here which lists records. You are unable to edit the records on the continuous form which is what I want. To edit records, the user should click the "Edit Record" button next to the record the user wishes to edit. This takes you to a form called "Data Editor" where you can edit that specific record. The "Edit Record" button is designed to take you to a form which should display the record where the ID equals the ID box on the continuous form. However, this button is not working as intended. It is almost working. It works fine when the Data Editor form is open in the background, however when it is not open in the background the "Edit Record" button will open the form but the form will be blank. I do not want this. I want the button to work as intended even if the Data Editor form is not currently open.

Attached is a picture showing what's going on
Attached Images
File Type: jpg Complaints.jpg (99.5 KB, 13 views)

kvnd is offline   Reply With Quote
Old 02-13-2019, 11:21 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,063
Thanks: 36
Thanked 732 Times in 715 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Simple issue regarding opening a form to a specific record, how to fix?

Hi. Can you post the code behind the button? Thanks.
__________________
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 02-13-2019, 11:30 AM   #3
kvnd
Newly Registered User
 
Join Date: Oct 2018
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
kvnd is on a distinguished road
Re: Simple issue regarding opening a form to a specific record, how to fix?

Quote:
Originally Posted by theDBguy View Post
Hi. Can you post the code behind the button? Thanks.
I didn't make it with VBA, I made it using the the command button wizard. This is the line of options I selected:

Form Operations > Open Form > Data Editor > Open the form and find specific data to display > where ID = ID

kvnd is offline   Reply With Quote
Old 02-13-2019, 12:19 PM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,063
Thanks: 36
Thanked 732 Times in 715 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Simple issue regarding opening a form to a specific record, how to fix?

Try enclosing the last "ID" in square brackets. Just guessing (without actually seeing it).
Code:
where ID=[ID]
__________________
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 02-13-2019, 12:25 PM   #5
kvnd
Newly Registered User
 
Join Date: Oct 2018
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
kvnd is on a distinguished road
Re: Simple issue regarding opening a form to a specific record, how to fix?

Quote:
Originally Posted by theDBguy View Post
Try enclosing the last "ID" in square brackets. Just guessing (without actually seeing it).
Code:
where ID=[ID]
I just opened the embed macro to look at the code. This is the where condition:

="[ID]=" &[ListID]

ListID is the name of the ID text box in the continuous form. Again, this button works properly - but only when the form this button opens is already open in the background. So I'm not sure that part is relevant?

I thought it just needs to update to meet this condition on loading up the form or something? You don't think so?

Last edited by kvnd; 02-13-2019 at 12:30 PM.
kvnd is offline   Reply With Quote
Old 02-13-2019, 01:36 PM   #6
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,063
Thanks: 36
Thanked 732 Times in 715 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Simple issue regarding opening a form to a specific record, how to fix?

Hi. I think the WhereCondition part, as you’re describing it to us, is probably fine. Why the form is not opening to the selected ID may have to do with the other arguments you have in the embedded macro. Can you show us the whole thing just to be sure? Thanks.
__________________
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:
kvnd (02-13-2019)
Old 02-13-2019, 01:48 PM   #7
kvnd
Newly Registered User
 
Join Date: Oct 2018
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
kvnd is on a distinguished road
Re: Simple issue regarding opening a form to a specific record, how to fix?

Quote:
Originally Posted by theDBguy View Post
Hi. I think the WhereCondition part, as youíre describing it to us, is probably fine. Why the form is not opening to the selected ID may have to do with the other arguments you have in the embedded macro. Can you show us the whole thing just to be sure? Thanks.
Sorry, but I just found the issue myself! The form for editing the data had the data entry property sent to yes. I changed it to no, and it works now. Issue is resolved. Thanks anyway

kvnd is offline   Reply With Quote
Old 02-13-2019, 03:10 PM   #8
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,063
Thanks: 36
Thanked 732 Times in 715 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Simple issue regarding opening a form to a specific record, how to fix?

Hi. Glad to hear you got it sorted out. Good luck with your project.

__________________
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
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening specific form record from datasheet hyperlink for (New) Record ry-mac Forms 1 01-14-2017 01:37 PM
Issue w/ Opening up specific record in Form. andmunnn Forms 4 08-18-2016 02:09 PM
Opening a form for a specific record rickdave Forms 0 11-29-2011 02:11 AM
Opening a form to a specific record BroncoMarc Forms 3 07-29-2003 11:12 AM
Opening form on a specific record colmtourque Forms 4 03-07-2003 05:41 AM




All times are GMT -8. The time now is 03:16 AM.


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