Using Excel 2003 and trying to insert a formula into a cell but can't get the concatenation right in the VB Editor.
This is the formula I want to be inserted:
=IF(Sheet1!A1="","",Sheet1!A1)
My current code:
ActiveCell.Formula= _
"=IF(Sheet1'A1=," & "" & "," & "" & "," & "Sheet1!A1)"
Thanks.
I'm stumped. I have nine separate html files which I paste into the body of an e-mail message in Outlook. File No. 1 is pasted first, then a carriage return, then I type a line of "=" across the page, then paste File No. 2 below. I continue until all nine files have been pasted.
I am trying...
Using Workbooks.Open to open five external Excel files and import the data from the individual files. The code works just fine for data files A-D but crashes on file E and displays Run-time error 1004.
The only difference I can find is the size of File E. Files A-D are from 53KB to 291KB in...
I'm stumped! Trying to return all offices from the [tbl OFFICE DATA] table for Mgr. 0, for all three of the F2B, F4, and OTHER categories, even if null.
No matter what I try, I can't get the results I want. Below is SQL code.
SELECT [tbl OFFICE DATA].[FINANCE NO], [tbl OFFICE DATA].OFFICE...
Trying to return Unit No. 364124 with zeroes for quantity and amount but it will not show up in query results.
Any suggestions? Thanks.
SELECT [tbl OFFICE DATA].[UNIT NO], [tbl ACTL EXPENSE DATA].ITEM_NO, Sum(Nz([QUANTITY],0)) AS [ACTL QTY], Sum(Nz([EXT_PRICE],0)) AS [ACTL AMT]
FROM [tbl ACTL...
I have a query with two other queries ([ACTL DATA] and [SPLY DATA]) as it's source. There is one entity (Site A) present in [ACTL DATA] but not present in [SPLY DATA]. Sites B-D are present in both [ACTL DATA] and [SPLY DATA]. When i run the query, Sites B-D display with no problem. No...
I'm attempting to use DLookup in a text box on a report and keep getting "#Error" returned. Can someone help with the proper syntax?
="Week No " & DLookup("[WEEK]","[tbl DATES]","[YRDAYWK]=" & "[tbl EMPLOYEE DATA].[YRDAYWK]")
Thanks.
I have added a text box to a report which is supposed to display the latest day of the week but I am having trouble getting DLookup to work properly.
I am trying to return the latest day of the week by finding the highest day number. Sat. is [DAY OF WEEK], 1 is [DAY NO], Sun. is [DAY OF...
I am attempting to have the user select the folder in which to save a backup file. But, I get run-time Error 3011. Here is the code:
Dim dbs As DAO.Database
Dim fDialog As Office.FileDialog
Dim FolderName As String
Dim FileName As String
Set dbs = CurrentDb()
Set fDialog...
I'm attempting to delete a column from a table using "ALTER TABLE...DROP COLUMN..." but I'm getting the error message:
"Run-time error '3211': The database engine could not lock table "WKHR DATA" because it is already in use by another person or process."
Here is the offending code:
Set...
I have a report that displays weekly data for the entire year, as follows:
Clerk Hours Week 1 Week 2 Week 3... Week 13
Week 14 Week 15... Week 26
Week 27... Week 39
Week...
How can I delete a field from an existing table?
I have combined the contents of fldA and fldB into fldB and now I want to remove fldA from the table.
Thanks.
I have a table named "WEEKS", consisting of one field ([WEEK NO]) that contains the week numbers of each week of the year, 1-52.
Our fiscal year always begins on Oct. 1 and ends the following Sep. 30. Our work weeks begin on Sat. and end the following Fri. So, when a month ends in the...
I am using the Outlook Object to create a new e-mail message from Excel. In the body of the message I would like to include a list of offices which are stored in an array. The list is not of a defined size- it may contain one office or 100 offices, depending upon what is in the array.
Here is...
I'm stumped.
Trying to combine the text "City" with the field value [CITY] in a text box on a report. Have tried many different combinations but can't get it to work.
"City: " & [CITY]
Any suggestions? Thanks.
Cannot find a reference to Run-time error 3422 (Cannot modify table structure. Another user has the table open.)
Here is my code:
Function Create_Chart()
Dim dbs As Database
Dim xlApp As Excel.Application
Dim xlWorkbook As Excel.Workbook
Dim xlChartObj As Excel.Chart...
I have a query with a single table, [tbl CANCELLATION DATA] as it's source. In the query design grid, I am trying to refer to two combo boxes on the form [frm CANCELLATIONS].
The two combo boxes are requiring the user to enter a start date and an end date. I am trying to use the user input as...
I'm stumped. Trying to create a make-table query in code. When I run the code below, I get 'Run-time error 3421, Data type conversion error'.
When I first create the QueryDef in code using the same parameters and criteria, and then run the created query, it works just fine. What am I doing...
I have a data entry form named [frm SAMPLING DATA]. The record source for the form is the table [tbl SAMPLING DATA]. The form also contains a subform [frm SAMPLING DATA subform] in datasheet view. The record source for the subform is a query [sqry SAMPLING DATA TEMP] which is linked to the...
I am using DoCmd.OpenReport "rpt MY REPORT" to print a report from the OnClick event. The report varies in size and runs anywhere from 100 to over 600 pages.
Is there a way to find out the number of pages that will be printed BEFORE it actually prints? I would like to display the page count...
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.