where
tblTS1 - tbl where I'm putting the data
filename - c: est.xls
Product!A1:H100 - range of data I want in sheet Product
I am having problems w/ the "range" portion of Transferspreadsheet (I know it's this portion, because it works when I pre-name the range in Excel). I have tried all sorts of variations on the syntax:
I get the error msg:
The MS Jet database engine could not find the object '$:'. Make sure the object exists and that you spell its name and the path name correctly." or "Syntax error"
I wanted to mistake-proof the data transfer, so I did not want to:
- predefine the range in Excel (under InsertNameDefine)
- have the user enter values in text boxes
Any help w/ the syntax would be greatly appreciated!
Bit stuck here but bet it is really stupidly simple I have the following code to export a query into a spreadsheet which worked fine but after I added the path name which is in bold it no longer works.
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "NME With Company Code", C:My DocumentsTDL Update(Format(Date, "mmmm")) & "'s TDL Information", True
what am i doing wrong what I am looking for it to export this to a specific folder in my documents.
Hi All, I'm new on this forum and not that experienced in coding. I am making an export to Excel and am wondering if (and how) I can set a Fliter on output. I have a db for keeping scores for contests, this db is used by several people in diferent locations, so I would like them to export there own contest and me importing this in my own db. I need to have a complete (all contests) db for competion rankings. Thanks for replying !
I need to: Take the result of a query and export it to excel. Manipulate the data in excel. Re import the same data into a table And finally put the table into an existing form
I have succesfully created the macros to Export the data and Re-import the data
BUT I have to mannually open the spreadshhet and save it for the RE-Import to reflect the updated data from the ss.
Everything works fine except the column which contains 'Material' holds both numeric and alpha-numeric values. For example these are both material numbers: 156952 and 1238707-202. The data in this column is formatted as General. The data type for Material in tblMPSDATA is Text, 18 character length. The alpha-numeric materials are all at the end of the file. When I import, an error table is created listing the alpha-numeric materials with the error 'Type Conversion Failure'. But if I have an alpha-numeric material in the first row of data then everything is imported just fine.
I have set up a nice little popup form with a file path and command button for controlling the process of bringing in this data. I really do not want to have to add special instructions about making sure the Excel data is sorted in a certain manner prior to importing. Any thoughts on why Access is not treating everything in this column as text?
I used the DoCmd.TransferSpreadsheet method to export from an Access 2003 table to Excel. The table had around 440 fields but only 230 (column iv) got exported.
Does anybody know whether there is a limitation on the number of fields that can be exported.
I have been using a transferspreadsheet cmd for a while now in Access 2003, but when I recently split the database so that the table the import is going to is now linked rather than residing in the same mdb file, I get a numeric field overflow error. I manually made all the values in the import 0, converted it to text, but got the same error.
When I imported the table back into the file, rather than having it linked, the transfer worked fine.
Can you not run the transferspreadsheet command on a linked table or am I missing something?
I seem to be stuck on the simplest of tasks with both google and forum searches coming up with information that’s either too simple or too complex for my needs (not time wasted though because I’m learning all kinds of related stuff).
How do I join my tables with one-to-one relationships?
[edit] Doh, got this one now - by indexing without duplicates then saying all in one have to link to one in another:D
How do I define both fields in a linking table as composite or two field primary key?
intSalesID (Number, Indexed: (Yes No Duplicates) intCarID (Number, Indexed: (Yes No Duplicates) intQuantitySales (Number, Indexed: (No)
This table is a cross table from the two tables tblCars and tblSales where the intSalesID and intCarID are Primary Keys. In this table I didn't set the P.K. I saw databases that have P.K. in tables like this deined from the two fields (intSalesID and intCarID, would be in my case). I wanted to ask what is the difference if I leave this table like this and if I set this two fields to form a P.K.? What is the difference in these twi cases? What do I get and what I don't, if I do either way? Thnx.
Hi all - I have a suite of reports which provide customer details. They all require the user to input the name of the customer.
The way it works is that I have a query which returns everything for the customer.
Then I have other queries based on the first query which bring back the specific information I want regarding the customer.
This works fine when the customer's name is entered using [Enter Customer Name] in the criteria of the relavant field in the first query.
However, because a user might want to run several different reports on the same customer it becomes a chore for them ot repeatedly have to enter the customer name.
My solution is to have an unbound field in the reports menu for the customer name and to use this as the criteria in the query, so it now reads [Forms]![FrmMenu]![Text42].
The first query runs fine, but the queries based on it are suddenly not returning any records.
There is undoubtedly a simple explanation for this but as I'm quite dim, I can't see it. Could somebody enlighten me and maybe even suggest a solution?
I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.
I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.
I was wondering what should I define a chechbox as if I want to make it a variable, so that when it is checked (= -1), I can check for the -1 and loop somewhere.
I have a database about when computers have been installed
I have a form It has a drop down list with Januray through to December
I want the user to select a month and a year and then click the command button and it will run a query displaying all the computers installed in the month of that year
When I run this query, the fields in the new table contains 253 characters. How do I specify in the SQL command that the field Carg2 and Carg3 will contain 3 charachters ?
SELECT dbo_allesc.AccReport, Left([AccReport],2) AS Carg2, Left([AccReport],3) AS Carg3,......................... INTO regTabell
how shall i define my new Date or numbers.Now "yyyyXX" this is my date "y" is year 4 digits and "XX" is my problem 2 digits. I ll give an example,
(XX = 01....36) XX can be max 36 and min 01 of course. f. Exp. 201436 and next number shall be 201501.
the biggest problem is different of these number with basic math 201501-201436= 65 but for me it should be 01... The Question is; How can define these ??
We have a db of salmon survey data where catch data is recorded by date, site, etc. Historically, we have used ‘sampling periods’ to group our results into blocks of time that can be compared from year to year, and within year.
Now, having frequented this forum I’ve read that we shouldn’t store information in tables that can be calculated from fields and I want to try to follow that advice in this instance but am having trouble working this out.
Here’s how we define a sampling period.
1.The start date of the first sampling period in a sampling year is the last Monday in the most recent November. 2.Each sampling period is 14 days long.
What I want to do is have a query use the date of a set to calculate what sampling period the set belongs to. I have an idea that I could use a datediff function to calculate this if I can figure out the ‘last Monday in the previous November’ part. I’ve searched this forum and googled but am having trouble finding anything that I can adapt to this as a query expression.
Anyone care to help a fish bio out? Much obliged :)
I am in need of your vast array of knowledge and experience. I have been fighting with this Access report for a few days now, and I've finally decided to ask for your help.
I am running a report which provides a look at a set of 12 survey results. The 12 items are numerical in nature and are decimals with 2 decimal places. What I am trying to do is have Access automatically highlight the top 3 scores in one color, and the bottom 3 scores in another color.
So what I need is an expression that allows Access to discern the top 3 and bottom 3 from the series of 12 scores. in Excel you can identify the top score with this with the formula "Max(A1:A13)", but seeing as in Access we don't have the cell identifiers, this approach will not work.
I know that I will need to use conditional formatting in order to get the cells to highlight. I also see that there is "Max" and "Min" functions in Access as well, and I attempted to create and expression like this "=Max([field 1] AND [field 2] AND [field 3] AND, etc...)" with no luck. I also tried changing the "AND" to "OR", again without luck.
One thing that I should mention is that the report does contain a lot of other data, so I need to be able to apply whatever the best fix is, to only those 12 fields.
Unfortunately I am not accustomed to using code, and as a result I am unsure of how to input it properly. I am certainly open to code solutions, but I would also need a explanation of how to put it in properly.
The easiest solution for me, if possible, would be an expression that I can enter into the conditional formatting wizard to tell it to highlight the values.
If anyone has any ideas, I would appreciate it. I'll buy you a virtual beer :-)
I have to create a control on a form that will be able to change to one of ten colors, some of them are subtle shades. I will be doing this from vba on the control. I know how to do all of this except defining the colors.
I keep seeing the 3 part RGB(xx, xx, xx) etc. but I can't find the values for it that will give me the exact colors that I need!
I also saw a possibility of using a the hex equivalent for the color but I couldn't make that work?
I have made severa databses before but im trying to make this one perfect and im curious, when defining tables should you include atributes about an entity that are static?
Its kind of hard to explain what i mean but for example in a shoe shop a staff member gets commision on what they sell (ie 5%) so when producing the table should a coloum be reserved for commision or should this be left out as it will be calculated later on in a querie and if so should i state this in the design section of my database?
any opinions would be greatly received as i have been reading books on sql and ERD's for days and havent been able to obtain any answers
I have a client that wants to enter a range of dates in a query of when they will call that person back. Then they want to be able to type in a range of dates and have a make table query show them all the people that fall in between these two dates....is this even possible??? Ex. Joe March 3 to March 8 Mary March 4 to March 9 John March 5 to March 10
So if they type into the query March 3 to March 6 all three people should show up because one of the dates specified lies within the parameters they are asking for.....man I am out of ideas
Dim dbtmp As DAO.Database Dim tblObj As DAO.TableDef Dim rs As DAO.Recordset Set dbtmp = OpenDatabase("C:WINDOWSBureaudevcli.xls", False, True, "Excel 8.0;") DoEvents Set rs = dbtmp.OpenRecordset("select * from [DEVCLI$A1:C10]")
in the last line i would like replace DEVCLI (the Excel sheet name) by a variable to make my program works with any excel file. What is the syntaxe for that ? Thanks in advance for help. VINCENT