Results 1 to 3 of 3
  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008

    Access VBA User Input form - help?


    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.


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

    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
    Cebu, PH

    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?

    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal |Programming | GitHub

    Rating someone's post is a way of saying Thanks...

Posting Permissions

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


Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.