473,421 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 software developers and data experts.

Subform Question

jen
I have a for that I've added a subform to. All the data is coming from
the same table. Whenever I try to run a macro that contains an event
for the subform, I get an error stating the subform isn't open. Can
someone help? I need to get these macros running and I have no clue
how to make access think the subform is open? I'm seeing it, it's open
in my mind...

Thanks in advance!

Nov 13 '05 #1
8 2299
jen wrote:
I have a for that I've added a subform to. All the data is coming
from the same table. Whenever I try to run a macro that contains an
event for the subform, I get an error stating the subform isn't open.
Can someone help? I need to get these macros running and I have no
clue how to make access think the subform is open? I'm seeing it,
it's open in my mind...

Thanks in advance!


A form displayed with a subfor is not "open" as it is not included in the
Forems collection of open forms. You have to refer to it "via" the parent
form.

Forms!ParentFormName!SubFormControlName.Form.Whate ver

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
jen
So do I have to save each field in the subform separately?

For example

Forms!Projects!ProjectsSubform.Task.Save
Forms!Projects!ProjectsSubform.Date.Save

etc?

Nov 13 '05 #3
jen wrote:
So do I have to save each field in the subform separately?

For example

Forms!Projects!ProjectsSubform.Task.Save
Forms!Projects!ProjectsSubform.Date.Save


Unless you go out of your way to prevent it Access saves all records
automatically when you move between the forms or change records.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #4
jen
Oh, my users will go out of the way to prevent it and then complain
about access, hence the need for a save button! :)

Nov 13 '05 #5
> Oh, my users will go out of the way to prevent it and then complain
about access, hence the need for a save button! :)


I think Rick's point was that user's aren't given a say in the matter:
unless you (the developer) write a bunch of code to prevent it, Access
*will* save the record if users do various simple things, like
switching between form & subform. So you don't have to save each field
in the subform separately; all you have to do is set the focus back to
the main form, and the subform data will automatically be saved.

--
HTH,
Martha
(don't google to email)

Nov 13 '05 #6
I posted a question about this very same thing. Does anyone have any
ideas that would allow someone to move between sub-forms while makeing
changes and once you move to a new record or exit out of the main form
it prompts you to save. If you don't save, then it will revert all the
subform changes back. Is this even possible in Access? I currently
have a Before Update script that prompts to save. The problem with
that is it's very monotonous. Everytime I move from a subform to
another or the main form, it prompts you to save. I would be nice to
have a prompt after all the changes have been made.

Nov 13 '05 #7
if your form and subforms are a single form, don't bind the data to
your tables and do the updates using a 'save' button

if any form / subform is a continuous form, you need to store the data
somewhere, it can only handle one record at a time

it might look like a big excel worksheet but it isn't, so if you don't
want to update the actual table, you'd need to create a temp table with
the temp data, that again gets updated using a 'save' button

or write the original data to a temp table, bind everything to the
actual table and provide an 'undo' button that copies the temp data
back

icedgar wrote:
I posted a question about this very same thing. Does anyone have any
ideas that would allow someone to move between sub-forms while makeing changes and once you move to a new record or exit out of the main form it prompts you to save. If you don't save, then it will revert all the subform changes back. Is this even possible in Access? I currently
have a Before Update script that prompts to save. The problem with
that is it's very monotonous. Everytime I move from a subform to
another or the main form, it prompts you to save. I would be nice to
have a prompt after all the changes have been made.


Nov 13 '05 #8
Thanks.. that's makes sense. Thank you for your reply. WOuld you
suggest using DOA tables for that or just actually creating temp
tables. Also which commands would you use in the VB script to update
the table data to the original table from the temp?

Thanks.

Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ivan | last post by:
I have a form (CustomerImfo) that has a subform within it (order). Within that subform is another subform (OrderDetail). That subform (OrderDetail) is displayed in Datasheet view. When I am...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
9
by: PC Datasheet | last post by:
I'm stuck on something that seems should be easy and I need some help. My main form has an option group with five options. My subform chooses from different lists depending on which option is...
1
by: google | last post by:
I have a form with several subforms. Users enter the data, then on the parent there is a command button that runs code to generate a .pdf document from a report based on the data they are working...
13
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.