Access VBA User Input form - help?-VBForums
Results 1 to 3 of 3

Thread: Access VBA User Input form - help?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    1

    Access VBA User Input form - help?

    Hi,

    I'm working on a complex database and I'm having some trouble. Can someone help or point me in the right direction?

    I am importing data from an Excel spreadsheet into an Access Table (Transactions Table), and in the process of importing, I'm checking the Acc table to see if the client's ID has been added to the Accounts Table. If it hasn't been added, then I want to open a form with a combo box and ask the user to select the Client_Name in the combo box that corresponds to the given ID and then store the ID in the Account Table. Then I want it to close the form in question and go to the next entry in the Excel spread sheet and check again for the ID. This all happens before the database imports the spreadsheet into the Transactions Table.

    My problem:

    DoCmd.Openform "Transactions"

    does not pause the main module while the user selects the appropriate Client Name and hits the Save button.


    How can I do this in a fashion that will work, essentially making the sub form a "Called Proceedure" which doesn't allow the main module to continue running until the form is done and the record is saved?

    Thanks for any help.

    -Scott

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    37,200

    Re: Access VBA User Input form - help?

    Welcome to VBForums

    I don't use Access, but I suspect that it has similar features to VB, in which case there should be an extra parameter to Openform, which allows you to specify to show the form Modal - which means your code will wait until that form has closed.

  3. #3
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    www.vbforums.com
    Posts
    1,261

    Re: Access VBA User Input form - help?

    What's the content of the subform and the mainform? is it linked via a primary key? or master child relationship?

    Greg
    Thread Helpers 101
    I. Don't forget to
    rate my post

    II. Mark your threads
    Resolved if it has been answered.
    III. Wrap your code snippets with code tags to make it readable.

    ____________________________________________________________________
    CodeBank Submissions (ASP.NET/VB.NET/C#)

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.