Consulting

Results 1 to 4 of 4

Thread: Help! Multiple Add using datasheet view

  1. #1

    Help! Multiple Add using datasheet view

    My problem is, I have a form named frmDBUserCreate. It has a subform frmDBUserAccType. The subform frmDBUserAccType is based in a form not a table. I need that subform to be able to add multiple records. It just sticks to one record only. Is adding multiple records in datasheet view based on a form possible? Also it is UNBOUND. I made it like that because I don't want the records added to the subform be automatically added to the table. I want it to be added once the user clicks the ADD button found in the main form frmDBUserCreate... is that possible? here's a screenshot of my form.. hope you can help me on this... thanks!

    also, i set the properties of the subform to allow edits, and additions. still it's not working...

    here's a picture: i74.photobucket.com/albums/i273/kurapica_kaye/problem.jpg

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    limecrafted, unfortunately your Link to the picture is not working.
    You can only get an Unbound form to add records and move on to new records by using VBA Code and VBA Generated SQL Recordsets.
    Why don't you want the data automatically added to the table?
    The user will still put the data in, correctly or incorrectly with or without your Add Button.
    However you can use VBA to stop the Automatic Update and also Undo individual records that have been entered as long as the Form isn't closed.

  3. #3
    Hi OBP! I dont want it to be automatically added to the table because the user wants that upon filling up the fields, it will only be added once he clicks a button. So if the user cancels it, the records should not be added. And upon closing of the form, if the user doesn't click the add button, the records wont be automatically added to the tables.

    "You can only get an Unbound form to add records and move on to new records by using VBA Code and VBA Generated SQL Recordsets."
    -Yes I'm coding it in VBA but i don't know how to move on to new records... what I only know is adding a single record...

    The add the HTTP to view the picture... I'm only a newbie here and it says that I can't add links if my post is not =5 or greater.. thanks...

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    You use this kind of code to add the data to the Table
    With rs
    .AddNew
    ![Document Location] = foundfile
    ![Document Type] = Right(![Document Location], 4)
    ![Last Accessed] = filedate
    ![File Size] = Filelength
    ![Document Name] = docname
    .Update
    .Bookmark = .LastModified
    End With
    and then clear all of the Form's Fields to enter a new record.

Posting Permissions

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