Can anybody explain the following for me:
CDbl(Int(CDec(87.0290060) * 10000000) / 10000000)<87.0290060 = false
BUT
CDbl(Int(CDec(87.0290070) * 10000000) / 10000000)<87.0290070 = true
I find this totally bizarre, and it's giving me a headache... %-(
(Oh, and it seems to be crippling my...
My app has developed an Error 424 "Object required" on the line marked below, but only on my WinXP Home developing machine:
Dim ObjExcel As Object
Dim ObjNewSheet As Object
Set ObjExcel = CreateObject("Excel.Sheet") '*error here
It worked a few weeks ago, and as far as I know I have not...
I have a problem getting a report based on a crosstab query to export to Excel in the format my users would like. (They want to click a button from report preview... got the button, but...)
The query is created on demand in VBA (columns are dynamic), and the report will be eventually if I can...
I have two tables: TBiology & tblTempSearchTextBiol
tblTempSearchTextBiol contains a single text field which stores user entered keywords, e.g.
CriteriaItem
water
wood
TBiology contains about 250K records of extracted text data in a memo field (field:data), with a CODE identifier field (not...
I've just upgraded to Office2003 from 2000 and, as usual both gained and lost features... the latter really pssses me off... happens every upgrade.
Anyway, in 2000 you could assign keyboard shortcuts to macros, and to toolbar/menu items - e.g. CTRL+G to the 'Group' command (in stead of Grid...
Can anybody tell me why I'm getting this in the following code when the number of fields is greater than about 70?
For Each fld In rs.Fields
If fld.name <> "CODE" And fld.name <> "Species Name" Then
SQLText = "ALTER TABLE BugsCountsheet ALTER COLUMN [" & fld.name & "] long;"...
I have a data input form for insect abundance counts per sample that resembles a crosstab:
CODE SpeciesName S100 S204 S206
1.0210441 Trechus 0 1 2
1.0291045 Bembidion 0 0 0
1.051011 Pstrenuus 0 1 0
1.051012 Pdiligens...
I can do this in VBA (code below) but am sure queries would be more efficient... (skip to the bottom if you just need to see the desired result!)
I have two select queries both of which extract two common fields from different tables (table1 and table2). One field is essentially the key field...
This is probably a syntax problem...
I have a dynamically created form that is used as a subform, I want to freeze a column on the subform when the main form opens. The following code works if used in the subform's OnOpen event:
CODE.ColumnHidden = True
[SpeciesName].ColumnWidth =...
Any way to use VBA to freeze a column in a datasheet view form?
I've found the FrozenColumns Property, which is readonly so not much help. I've managed to set the property in form view (right click on column...), but can't find out how to do this in code.
So far:
Private Sub Form_Open(Cancel...
Any way I can get this SQL to work like =DCount as the control source for a text box?
select count(*) as countofdistinct from (SELECT DISTINCT TFossil.CODE, TSample.CountsheetCODE
FROM TSample INNER JOIN TFossil ON TSample.SampleCODE = TFossil.SampleCODE
GROUP BY TFossil.CODE...
I'm VBAing myself in knots here trying to get a listbox to synchronise with it's parent form from another form...
Short version
Why doesn't this work? I want form A to move to the same record that form B was displaying when it closed. Form A must be requeried to reflect changes made on B. Form...
I have a button on a subform to allow the user to edit the current record. By default the subform is set to AllowEdits =false, and the button is coded:
Private Sub ButEditDate_Click()
'Allow edits for subform, and changes edit button to a 'save' button
If Me.ButEditDate.Caption = "Edit Date"...
Hi, I'm getting extremely frustrated here trying to simply use VBA to get the Max of the currently selected cells or range.
I'm trying to insert the code into an already functioning sub in an Access db which draws multiple bar charts for a spreadsheet. I want the Max value so that I can scale...
Hi,
I'm struggling with replacing a somewhat repetative "Select Case" block with something more efficient, which entails constructing the name of a variable from a string. Here's the working version:
'dim...etc (all variables called CheckStat* are global & boolean)
CheckName = "CheckStat"...
Can any one tell me how to rename the active worksheet - more specifically the one just created?
At the moment I have
Dim ObjExcel As Object
Set ObjExcel = GetObject(Filename)
ObjExcel.Application.Worksheets.Add
Sheetname = "Sheet" & row - 1...
Hi,
I'm trying to dump an array from Access to Excel using code.
The following (abbreviated), looping through each element, works fine, but is REALLY slow:
'ArrayMCROver() is passed to the sub
Set ObjExcel = GetObject(Filename)
Set ExcelApp = ObjExcel.Parent
With ExcelApp
For r =...
Could anyone tell me under which circumstances the following will not work?
ObjExChart.Location xlLocationAsObject, "Graphs"
I have the line in a module that draws a couple of charts, moving the chart to the "Graphs" worksheet when drawn.
If I just have 2 worksheets, then it works fine -...
I'm trying to let users open an Excel file from an Access2000 database through a command button.
The code below produces an Excel session where nothing in the workbook can be selected for a (variable length) while, and persistant attempts lead to a
"Program Error" EXCEL.exe has generated...
I have a situation where I want to add the values from blocks or rows of a table together, cell wise - matrix arithmetic, basically.
I have a functioning system using queries (SUM and GROUP BY), and a few tables which are emptied and refilled during the calculations. The calculations are...
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.