Guys, I got it working. And I am to blame for this whole issue: I had set the TACID to be a text field as I was told that it could be alpha-numeric. I completely forgot about that. So I put the single quotes back into a and removed it from x. This combination worked and its working as expected...
@vbaInet: The fields in the table "TACFinal_tbl" were to be populated by other queries in a different part of the application. This section of the database deals only with exporting the results to Excel. The fields in the table are set to be numeric and sometimes currency.
Thanks for taking an...
The values of a and n are:
a = Me.TACID_tbx.Value
n = DMax("[Scenario ID]", "TACFinal_tbl", "[TAC ID] = '" & Me.TACID_tbx & "'")
@Bob: Thanks for replying:) It is a table, not a query.
@ All: Thanks so much for replying. However, I am still getting the error. I have done the changes (removing the quotes and adding the ";") I also checked if TACID_tbx is returning a value. It does. I stored it in another variable and made that to be displayed in a 'test' field in the form. The...
Hi,
I am exporting a record set to Excel within a loop and I am encountering the following error while defining that record set:
Error 3061 - Too few parameters - Expected 1
The line of code highlighted is:
Set SResults = db.OpenRecordset(sqlResult)
The line in context is:
For x = 1 To n...
@ Paul and Michael: Thank you for replying.
@ Paul: I have used the solution you have described in the site and it works perfectly :)
@ Michael: I found your reply very insightful and I am sure the table on data type mapping is going to prove useful in my current project, especially since I am...
Hi,
I get the following error when I open a record set:
Run-time error 3075 Syntax error in query expression 'Equiptment = 40' Standard Dry"
I am guessing that the error is because of the symbol ' in the string. But here 40' stands for 40 feet and has nothing to do with SQL. How do I make...
Why don't you locate the file using a 'Browse to..' dialog box every time you import the excel sheet? This way you need not hard code even the folder location. The code is pretty simple.
Dim fileDump As FileDialog
Set fileDump = Application.FileDialog(msoFileDialogOpen)
fileDump.Show...
Hi,
I have got the code to work as I want to for now. I am posting this for anybody else who wants to do the same thing (Provided you are not offended by the way it works :D). This is the code I have come up with:
Private Sub ExcelEdit_btn_Click()
'**********Transfer the table to a newly...
Hi,
This is what I want to do:
1. I have a split form with a button. When I click the button, the table should open in a newly created excel file.
2. The user will make some changes to the data.
3. At this time, a pop-up box will appear in the access window saying something like, "Do you...
Hi,
I have a split form which I am filtering based on selections from two cascading combo boxes. The filter works fine with the first combo. But when both the first and second filter is applied, I get a syntax error. The piece of code that I am using in the after update event of the second...
Hi,
I have adapted a piece of code which is used to copy a record set to an excel worksheet. What I want to do is copy multiple record sets one after the other and paste them side by side in the worksheet. This number of record sets is not fixed and is determined by a counter. Basically, this...
Your reply gave me an idea and I shifted the entire code to the second form's 'on open' event. Everything works as it should. I don't know why I didn't think of this before. :D Thanks!