Up until now, I have been using Microsoft Query to retreive data from MS Access database. This has worked well, so far. I also like using SQL statements (criteria) and MS Query Data Range Properties. But this project has gone beyond this.
I need to create a user form to open and transfer data from several Access tables using VBA code from an Excel application that will do the following:
Create UserForm with 3 drop down boxes and 2 command buttons.
Command buttons will be named 'New Week' and 'Review Week'
Each drop down box will contain a parameter (a user choice)
Drop down box 1 will import it's data from the Access DB as 1 field in XYZ table
Choices made in drop down box 2 & 3 will be validated in each command button's code.
The basic code for each command button will be the same except, one button will open all Access tables as read only and the other will open one table as read/write or read/append.
I have searched the web and have a new book to try to help with this, but there seem to be 100 different ways to do this. I basically have 3 questions for this:
1. How to open or connect to a database (like MS Query does) and I perfer to use SQL?
2. How to set the Data Range Properties with code?
3. How to set up a drop down list box on a user form and use an Access DB field as the list's data?
Any help will be greatly appreciated...