Results 1 to 3 of 3
  1. #1
    Milan25 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Location
    Slovakia
    Posts
    5

    MS Access - Subform

    Hi,

    I want to consult with users in this forum the following:

    my database contains a form which includes a subform.
    What command through VBA or macro I can set the action of opening the form:
    1) mode of data - the addition (to form & to subform that is displayed as a data sheet)
    2) mode of data - modifications (in the form of records and also a datasheet subform, which belongs to the entry of the main form).

    Basically, this is the mode setting data for each subform when the main form is opened.



    Milan

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Are you referring to the "AllowEdits", "AllowDeletions" and "AllowAdditions" commands? What are you trying to accomplish? Not quite sure I follow.

  3. #3
    Milan25 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Location
    Slovakia
    Posts
    5
    hello,

    yes, thatīs it.
    I have already solved my problem with this code:

    Private Sub Form_Load()

    If CurrentProject.AllForms("Form1").IsLoaded = False Then
    Me.AllowAdditions = True
    Me.DataEntry = True
    Else
    Me.AllowAdditions = True
    Me.DataEntry = False
    Me.AllowDeletions = True
    Me.AllowEdits = True
    Me.AllowFilters = True
    End If

    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Write Code to Navigate from Subform to Subform
    By Swilliams987 in forum Programming
    Replies: 22
    Last Post: 02-04-2011, 11:30 AM
  2. Access 2003 subform linking problem
    By RANCHLAW56 in forum Access
    Replies: 1
    Last Post: 12-26-2010, 05:35 PM
  3. Replies: 3
    Last Post: 08-08-2010, 05:33 PM
  4. Access Reports - Applying a subform filter
    By AMCUser in forum Queries
    Replies: 13
    Last Post: 06-25-2010, 07:32 PM
  5. Subform Dialog Box Hard to Access
    By TrudyD1474 in forum Forms
    Replies: 1
    Last Post: 06-11-2010, 09:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums