Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: MePenguin
  • Content: Threads
  • Order by date
  1. MePenguin

    Number comparison problem

    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...
  2. MePenguin

    Error 424 &amp; CreateObject(&quot;Excel.Sheet&quot;)

    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...
  3. MePenguin

    Export crosstab with grouping to Excel

    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...
  4. MePenguin

    test memo field for multiple keywords from table

    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...
  5. MePenguin

    Reassign shortcut keys Powerpoint 2003?

    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...
  6. MePenguin

    Too many Fields Defined Error 3190

    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;"...
  7. MePenguin

    Check for zero record sums, variable number of fields

    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...
  8. MePenguin

    two way table comparison with nulls from both sides?

    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...
  9. MePenguin

    freezing column runcommand fails

    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 =...
  10. MePenguin

    Freeze datasheet column in on the fly form

    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...
  11. MePenguin

    Count of distinct records in textbox

    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...
  12. MePenguin

    Move to record on another form &amp; update listbox

    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...
  13. MePenguin

    AllowEdits false failing = confusion

    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"...
  14. MePenguin

    Max of selected cells - shortcut?

    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...
  15. MePenguin

    Variable name in a variable?

    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"...
  16. MePenguin

    Rename active Excel worksheet

    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...
  17. MePenguin

    Array dump to Excel fails

    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 =...
  18. MePenguin

    Excel chart to wrong worksheet?

    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 -...
  19. MePenguin

    Excel unstable from Access VBA

    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...
  20. MePenguin

    Matrix addition in VBA? Or summing cells...

    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...

Part and Inventory Search

Back
Top