User Profile
Collapse
-
So you can't find the error? -
Yet another insert syntax error 3134
I can't look at it any longer, I'm going nuts. Can anyone find the Insert error(s). It worked at one point but I made some changes and messed it up somewhere. Try not to laugh, this is my first coding project.
Thanks
-Ineedhelpplz
...Code:Sub Button10_Click() Dim strSQL As String Set appAccess = CreateObject("Access.Application") appAccess.Visible = FalseLast edited by zmbd; May 7 '16, 02:56 AM. Reason: [z{Removed the IRL username and replaced with generic}] -
-
Thank you! I tried it so many ways but never put double quotes starting the new line. I'll read that info about normalization. Thanks to everyone!Leave a comment:
-
I just want to use a space and underscore in line 9. Is it possible? How?Leave a comment:
-
I did provide the compile error in my original post because I thought it would be a good place to start. Try using a space underscore in line 9. It should work. But doesn't. I've tried it 100 ways. see below
...Code:Sub Button10_Click() Dim strSQL As String Set appAccess = CreateObject("Access.Application") appAccess.Visible = False strSQL = "INSERT INTO [Finished Batches] ([ReleaseDate],[BatchSheetNo],[LotNumber],[BatchSize],[UOM],[BlenderNumber],[Ingr1],Leave a comment:
-
My problem is that the underscore causes a compile error. Give it a try. :)Leave a comment:
-
Thanks, that is so much better. But I spent a lot of time trying to break down line 9 so I am still wondering if it is even possible, and if its not, why?Leave a comment:
-
How do I break a long single line into multiple line
How do I break the strSQL line into shorter lines? I know it's been asked here a thousand times but nothing seems to work. I keep getting "compile error: Expected: End of statement" Any recommendations for this novice would be great.
...Code:Sub Button10_Click() Dim strSQL As String Set appAccess = CreateObject("Access.Application") appAccess.Visible = False -
Thanks twinnyfo, Im willing to try it. I want the user to be able to use the info on the spreadsheet and enter more data onto it, then export into access. Each time the sheet is used it will have a new name. I would still like to see what Lines 8,9 and 10 would look like if the select and insert were changed to:
F24 into Ingredient2
F25 into Ingredient3
F26 into Ingredient4
G24 into Lot2 (Formated as number
G25...Leave a comment:
-
I need the values. I hope this link will work, I think it would really help it you saw me excel sheet. Maybe this would be easier if I copied ( =sheet1!a1 ) all the values to sheet2 in one long row with a header row.
https://mega.co.nz/#!2cZ3kKAZ!BL-HJM...1tZewrw-CH-1Dc...Leave a comment:
-
Last edited by zmbd; Feb 2 '15, 08:02 PM. Reason: [z{please keep in mind, most of us cannot access mass-storage sites as we work in secure environments :) }]Leave a comment:
-
I wish I could attach my spreadsheet, I don't think it will work as a table. It contains a bunch of calculations.Leave a comment:
-
Exporting Excel cells to Access using VBA
The code below works but I don’t understand the Values (line line 9). I keep getting error messages. Could someone add more fields to it, such as:
F24 into Ingredient2
F25 into Ingredient3
F26 into Ingredient4
G24 into Lot2
G25 into Lot3
G26 into Lot4
The Ingredient column and the Lot column will both have 30 rows for data.
...Code:Sub Button10_Click() Dim strSQL As String
-
In your first post above you stated:
"string1" & "_String2" or "string1" & "_String2" would both equal string1_String2
Is there any difference in the first and second example?Leave a comment:
-
Why isnt there more consistency in lines 8 & 9? I'm having a hard time making sence of it.
So what would it look like if I added more cells, like
h24 to Ingredient2
i24 to Amount2
a2 to Title
b3 to Subtitle
Thanks Very MuchLeave a comment:
-
I'm still puzzled with lines 7,8,9. I was hoping to see a pattern there so I can append more cells, but I can't make sense of it. All the "'",&#'''(" ,&"' is a little confusing.
Thanks for the helpLeave a comment:
-
How do I export specific cells in Excel to fields in MS Access
I would like to click a command button on an Excel worksheet and have it open an existing Access db named production and export some of the data (some cells are calculated)to specific fields in a table (or new record on a form would be better) called Finished Batches.
As Such...
c5 exported to field named 'production_dat e'
d5 exported to field 'lot_number'
f23 to ingredient1
g23 to amount1
... -
Ineedhelpplz started a topic How do I export a single record from MS-Access to specific cells in Excelin AccessHow do I export a single record from MS-Access to specific cells in Excel
I am trying to export the record displayed on a form in Access to an Excel template which I would then rename and use the data in further calculations. I want to click a button on the form to transfer the record to Excel, I rename it and be done. The data fields will need to go to specific cells in the spreadsheet. Each record represents a seasoning formula with fields as such:
Formula_name
Formula_number
Date_entered
...
No activity results to display
Show More
Leave a comment: