-
Mar 4th, 2008, 12:30 PM
#1
Thread Starter
New Member
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
-
Mar 4th, 2008, 12:34 PM
#2
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.
-
Mar 4th, 2008, 09:17 PM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|