I import excel to access and get filed name with space in between. ("account number" for example). How to let access sql handle filed name like that?
THX
How to combine those two subs?
first check if qurey Q1 already exsits, if it does not, create it, otherwise create it.
THX
Jeff
Public Sub MakeQuery1()
Dim db As DAO.Database
Dim qry As DAO.QueryDef
Dim sqlText As String
Set db = Access.CurrentDb
sqltxt = "Select * from sales_channel"...
What is wrong with following code?
I want to get a updated table of renewals (ten columns)with two fileds of sales_type and sales_representative updated.
but it comes out with a table with only two columns.
Thanks.
Jeff
UPDATE renewal06, purchases_all
SET renewal06.sales_type =...
two sheets s1has column s1-c1 s1-c2
s2 has columm s2-c1
What is want to do is that for each element in s1-c1 if it is in s2-c1 return true, otherwise return false. teh results are written to s1-c2.
How can I do in in VBA?
THX
I have an Access table t1 which has a colum income, I want to create a new column group based on income.
0<income<10000 1
10000<income<20000 2
20000<income<30000 3
30000<income<40000 4
......
how can I do it wiht sql or vba?
ThX
In another thread, i was told Docmd.RunSQL can not handle Select, because it is not a action sql instruction. My question is how can i write a program to run several sqls (select) in one file? (I know if I wrote 40 sql with same structure with different filed. in the Acccess interface, i can do...
Sub RUN_Query()
Dim SQL_Text As String
SQL_Text = "Select * from MindMark"
DoCmd.RunSQL (SQL_Text,false)
End Sub
when I try to run it,
I kept on getting an error msg: A runsql a action requires an argument consisting of sql statement
How can I fix the problem?
THX
JEff
Thank you for response.
A1: 1,4,8,15
I just want to cout how many "1" , how many "2"s and how many "3" s ....in column A.
If I can split it in excell, I can import the excel file into excess and count it easily.
I guess VBA can do this trick, but i do not know how.
Jeff
I have a query in excess
SELECT Col1, count(id) AS [count]
FROM table1
GROUP BY col1;
I have about fourty columns in table1. and I need to run this sql statements to all columns. It is tedious to change col1 fourty times. Is there a good way to do that more efficiently?
THX
In excel I have
A1: 1,2,5,7
A2: 2,3 5
I want to parse the strings in A1 and A2 and put the result in B1: 1
C1: 2
D1:
E1:
F1: 5
G1:
H1: 7
B2:
C2: 2
D2: 3
E2:
F2: 5
G2:
H2:
How Can I write a VBA function to do that?
Thanks
JEFF
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.