Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    31

    Unanswered: Read Only Form, but then add records?

    hello again

    Is it poss to have a read only form (locked) but then allow the user to add records to the form? How would I do this?

    Cheers

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Use Me.AllowEdits = True to allow edit and entering data, also use Me.AllowAdditions = True to allow adding records

  3. #3
    Join Date
    Jun 2004
    Posts
    31
    Thanks for that - but as logical and simple as that sounds it doesn't seem to work. Do you have any clue what I may be doing wrong?:

    Private Sub TCO_Number_BeforeUpdate(Cancel As Integer)

    Me.AllowEdits = True
    Me.AllowAdditions = True

    End Sub

    I also tried to put to code in the "add" command button and that didn't work. Have I locked the form wrong? (I just locked it!!!). Sorry!

    Cheers again tho!

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    To lock your Form just set the allow Addition to False then in the navigation bar of the form the button add new which is an arrow towards right and an astrisk will be disabled and showen in grey.

    I think you have a button to allow the addition just put in its on click event
    Me.AllowAdditions = True

    I tried by me and work ok.
    Attached Files Attached Files

  5. #5
    Join Date
    Jun 2004
    Posts
    31

    Red face

    Fantastic! Thanks so much! I finally got it.

    However, now I have another problem. Even tho I have used allowdeletions:

    Private Sub Form_Current()
    Me.AllowAdditions = True
    Me.AllowEdits = False
    Me.AllowDeletions = True

    and put:

    Me.AllowDeletions = True

    in the delete command button, the records are not being deleted. Any ideas?

    I also need to be able to change the date on each record - how can I do this?
    Last edited by raepepper; 06-11-04 at 07:50.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •