I have to import and excel file with 3 columns, all of which match columns in access table1.
The excel file is named newdata.xls and data is in columns a, b and c.
Is there any way I can import this in to table1 with the user simply pressing a command button?
I find that access frequently...
Thank you PCLewis for an excellent piece of help - the code ran a treat and I can now modify it to extend the updates required.
Congratulations of you Tek-Tips award, you deserve it.
Gordon
Sorry, my use of English made it unclear.
I want to update the existing data in table1.outteacher with the data from table2.teacher
The data has to be found in table2 and copied to table1. The conditional field in table1.yeargroup
I do not want to create extra records.
Sorry if I confused...
In table1 I have a field "Teacher" and I want the data from row 4 to be inserted into table2 "outteacher" where the "yeargoup"= 6P
I have tried this sql code:
UPDATE Table1 SET Table1.Outteacher = Table2.teacher.[tbl2ID] = "4"
WHERE (((Table1.Yeargroup)="6P"));
Thereis an error but I can't...
Thank you aceman1 and PVH Both code versions worked perfectly and I will now have a happy bunch of teachers with less work to do correcting their annual reports. A few seconds saved makes up a lot of time for some who are writing 500+ reports.
Thanks once again.
Sheer brilliance that I...
Aceman1 - your function has very nearly got there. I still got multiple spaces but I added an extra space to the fixspc line to give 3 spaces to check for and it worked fine where there are just one outcomment and one outjoin fields that are blank before the next selected outcomment or outjoin...
Thanks PHV - I tried the amended code but got a message box saying it wasn't valid.
My code is in the textbox, is yours intended for the same location or am I missing something?
My problem is that the blank spaces might be 2, 3, 4 or even 5 in number.
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.