PDA

View Full Version : Excel-Access Question



alsa
01-17-2009, 09:11 AM
Hi All,
In order to make as simply as possible what my problem is please find attached two documents (my_example.xls and db32.mdb). Excel workbook is connected to Access database. All can be seen in VBA editor.
In order to make this working just specify correct path to db on your PC.
Sheet2 is gathering information I wish per each TCID separately (pay attention to combobox load and loc (TC...TC5) I used (from Users table in Access mdb) depending of entered user name and password.It works fine.
Here is my problem I really need urgent solution (related to sheet3 in which I want to have correct information):
If you use username aa and password aa you can see in combobox in sheet2 only TCIDs that in 5th and 6th position contain value 09, 10, 11, 12, 13 and 14 (as defined in USERS table in Access db). Following to that in sheet 2 you can generate informations only for one chosed TCIDs from Combobox. In sheet3 i need to make possible to have sum of Value1 in cell B7 refferng to date (column in TEMP table in Access db) for all TCIDs at once(that in 5th and 6th position contain value TC, TC1, TC2,TC3,TC4,TC5 as specified in Users table in Access db). This mean when user chose one of offered dates he\she would have sum of all TCIDs he\she at aggregate level (for e.g.09,10,11,12,13 and 14 TCID) not only for one of them. So basically sql statement in where condition has to reffer to Users table and collect only TC...TC5 assigned to used UserName and Password inLogin to Excel Workbook.
I would very appreciate help in order to solve my problem.
Also I would very appreciate to use attachet excel document in providing solution.
Thank you very very much for time end effort.
Best regards

lucas
01-17-2009, 10:13 AM
Please give your threads meaninful names. It helps members when searching the threads.

Bob Phillips
01-17-2009, 10:17 AM
You could also help by explaining what is required in functional terms, it is not clear.

alsa
01-17-2009, 12:28 PM
Hi,
I hope this will help:
1. there is tabele USers in Access with columns TC, TC1,TC2,TC3,TC4,TC5
2. there is sheet 3 in Excel document:
-In Cell "B7" (Sheet3) i wish to have sum of values from column Value1 in table TEMP (in access) where tcid in 5th and 6th position have TC,TC1,TC2,tc3,tc4 and tc5 values (as defined in table USers),
-In Cell "B8" (Sheet3) i wish to have sum of values from column Value2 in table TEMP (in access) where tcid in 5th and 6th position have TC,TC1,TC2,tc3,tc4 and tc5 values (as defined in table USers).

It means that dependig of username and password (initialy entered in Workbook activate) user will only in sheet3 select date in combobox and load cell7 and Cell 8 with information according to assigned TC,TC1,TC2,TC3,TC4 and TC5 values for that particular User.

I hope this is now more useful in order to understand what I would like to have as result.

alsa
01-18-2009, 06:29 AM
Please if somebody can help. I would appreciate a lot.
If something else need to be provided\explaned from my side please let me know.
Thanks