Search results

  1. M

    recordsets collection doesn´t work

    Sorry chilluk: DB_OPEN_DYNASET is default (no need to give) and is an old Access95-constant. Blazen: your code should work! Some ideas: Does "tablename" really refer to a table? Is table "tablename" an MS-Access-table in this or another .mdb-file? Or is it an ODBC/FoxPro/... table? Do you use...
  2. M

    Adding OLE objects to Access Table automatically

    Sorry, there is no way in Access of transferring OLE-Objects direct into fields of tables.. You need to open a form and put them in there in a OLE-object-field. There are some - but not many - commands for OLE-actions. But you can insert or copy any OLE-object automatically. Look up help for...
  3. M

    Making label visible...

    (Hope I've understood..) Try to use two different controls: 1. the button itself 2. the label, you want to show after <click> Do like this: Set the property "Visible" to false for the 2nd control - and change "Visible" with the click-event: Me.btnButtonToClick.Visible=false...
  4. M

    Path-Selection: CommonDialog/WinAPI possible?

    Hey out there! When you've worked a lot in VBA and are common to things like CommonDialogs of WindowsAPI etc...: Why isn't there an easy way to let users select paths? By using the CommonDialog for FileSelection all out customers get astonished and say: How easy and well done! But when they...
  5. M

    Tough One

    Probably you format any data before pushing into the control - you succeed by doing it vice versa: Just select any (double-)value as DataSource for any control - but avoid doing any formatting like Format(dblData, "#,##0.00 DM"). Then choose "Currency" as format for this control...
  6. M

    Methods to Open a Form Thru VBA

    Opening with this record works like this: [Open Form] dim rs as Recordset set rs=forms![NameOfForm].RecordsetClone rs.FindFirst strCriteria ' like "[ID]=146" forms![NameOfForm].Bookmark=rs.Bookmark set rs=nothing Hope you'll succeed!
  7. M

    median and mode calculations

    I hope I remember my old school days well: Median should be (Max(Field1)+Min(Field1))/2 - so that's it. But: Really in Access there is no "median"-function. Mic
  8. M

    Record look up and Max number set

    You need to change the LinkCriteria, because - I assume - [NameID] is not text, but number. Do this: DoCmd.OpenForm "frmStudent", , , "[NameID]=" & CLng(Answer)
  9. M

    Access97 application remains open

    Use this: DoCmd.OutputTo acreport, "AA", acFormatHTML, c:\mydir,, AutoStart:=False Or read help-topic on OutputTo Mic
  10. M

    deleting a query

    Or just do: On Error Resume Exit_ If CurrentDB.QueryDefs!("NameOfQuery") then CurrentDB.QueryDefs.Delete "NameOfQuery" endif Exit_: Mic
  11. M

    Specifying a Path when importing

    Code like this: Dim strPath as String strPath=me.TextFieldForPath DoCmd.TransferText ..., ..., ..., strPath & "FileName.txt", ... Mic
  12. M

    Assigning Records

    ...Not that difficult: Create different tables. Use add-queries to copy a record to another table Delete this record from the original table If you do good queries, you can split quite easily just running several queries. Mic
  13. M

    does a table exsist????

    Try to catch the exception - i.e. use error-handling like this: Dim rs as Recordset On Error Goto Err_ Set rs=currentDB.OpenRecordset("TableName",dbOpenTable) Exit_: Set rs=nothing Exit sub Err_: MsgBox "Table not found" Resume Exit_
  14. M

    Addnew

    Faster than .AddNew and then For Each fld In Recordset.Fields... might be the this SQL: SQL="INSERT INTO ThisTable SELECT * FROM ThisTable WHERE ....;" Or you could do: SQL="INSERT INTO ThisTable VALUES ....;" Mic
  15. M

    Code not running

    Probably your SQL does not run - did you abbreviate?? First: Your SQL does not contain FROM TableName nor ORDER BY FieldNameWithSortCriteria - therefore it won't work at all. Second: Try this: Dim rs AS Recordset Set rs=dB.OpenRecordset(STRSQL)...
  16. M

    Opening MS Office Apps from within Access

    Normally you can open any Office-Document much more comfortable by using this: Dim oPPT as Object set oPPT=createObject("Powerpoint.Application") Then you can control all Powerpoint-funcs from within VBA. Hope you can understand and use this.
  17. M

    File Conversion...

    Yes there is -although it's quite a long way... Use: Open "C:\Dat\FileName.1234" AS #1 etc...
  18. M

    Common Dialog Control

    Poor you! It's quite a complicated task! I use common dialog like this: (comments in German - just leave them out) Option Compare Database Option Explicit Public Const OFN_FILEMUSTEXIST = &H1000 Public Const OFN_READONLY = &H1 Public Const OFN_HIDEREADONLY = &H4 Type TOpenFileName...
  19. M

    Launching particular parts of Acess

    There is more than one solution for you: 1. Just hide all other objects. Do this by right-click to database-window-objects and check "hidden". 2. Use the Access-built-in password-untility: You can restrict changes to certain users, although every user could see it. 3. Create queries which...
  20. M

    Sending Email on a machine with multiple profiles

    Do you know you can also open OUTLOOK via getObject(,"Outlook.Application")? Sometimes it's quite hard to get through the object-libraries (and help-topics...). But it might work.
Back
Top Bottom