Search results

  1. M

    Modifying an Open Source Database

    Hey Robyn, you may need to change the connections of each _connected_ table to a new destination - and of course the mdb the connected tables refer to. At best call the "connection-wizard" at Extras/addins and choose to connect to the new location. Should work. (We normally deliver a code to...
  2. M

    Security thru VBA

    Hi blazen, pole sana kwa kazi (Kiswahili for: poor you working hard on this difficult matter!). In fact: The Access-security-system is not an easy to administrate tool. About login window: Your login name is normally stored in system.mdw in C:\winnt\system32 - therefore you do not get a login...
  3. M

    The Openreport action was canceled

    How do you get this message? What does any Private Sub Form_Open? Does the form-query produce any error? Your question is just too short.
  4. M

    Modify Access Tables thru VBA

    Hi loudenkl, do you really need to change an Access-(Application-)setting (locally stored in profile, not bound to any mdb!!). Normally you only set fonts for forms, queries and reports - there you can choose from a wide variety. In case you really want to do it as you've described: Do menu...
  5. M

    Error in mde file

    Sorry sgoswami, I don't know any list as you need. In general: mde-databases are compiled (and not only pre-compiled like mdb) and therefore do not support any re-compilation. All functions (normally) forcing re-compilation are excluded. Also changing forms, reports and modules is not...
  6. M

    This is a Visual Basic qustion but....

    Hi Talismatic, look up the help topic to the VBA-command "Open" (online-help when editing any code). There you find (German version): Open Pfadname For Modus [Access Zugriff] [Sperre] As [#]Dateinummer [Len=Satzlänge] ...and all explanations. Mic
  7. M

    hide system error message

    Hi karmawangdi, DoCmd.SetWarnings (...) does only suppress some warnings like those at action-queries. But: Normally error handling should catch exceptions - why do they not work? Did you put On Error Goto Err_thisSubOrFunction in every routine? Ask again if necessarry Mic
  8. M

    VB sql to return value

    Use: strHold = rsta!1 or: strHold = rsta("1") or: strHold = rsta(1) ' first field, no matter which name
  9. M

    Select query in VBA

    Hi Paul, RunSQL only works with action queries (which is reasonable). But you can create a query calling values from any (open) form, setting WHERE to Forms!MyFormName!MyControlName So when you don't close the form before, you can use that query. Else you need to open a recordset like this...
  10. M

    Passing list box selections to query

    Hi Mark, probably I'm not really getting what you need and esp. what you have. Nevertheless: Some hints: Your criteria-string is not being well built, change to: Criteria = Criteria & "OR ('" & ctl.ItemData(Itm) & "') " (be careful about blanks and " or ' !) Do not change QueryDefs, but use...
  11. M

    How to detect if a subform has data or not?

    Hi caolan, there is no HasData in forms or subforms. Therefore you need to go a different way: Dim rs as DAO.Recordset set rs=MainFormName.SubFormName.Form.RecordsetClone rs.MoveLast MsgBox "There are " & rs.RecordCount & " records in this subform." set rs=nothing Mic
  12. M

    Using Previous Record in a formula

    Hi Karen, don't give up! You can do this workday-function - but first you need to set up a full calender stating Sat/Sun and all the required holidays. Then you do a DMin("DateField","TableCalender","[DateField]>[StartDate]) (and set this to defaultValue for the control) Mic
  13. M

    File Rename within Access

    Hi Grandchester, there is a very well to do way for this - yet it needs some programming. I've done it quite some times, but still it always needs to be tested well. Solution: Use the fileSystem-object! (Look up in the object catalogue (->F2 in VBA-code)). There is fileCopy(strSource...
  14. M

    need opinion on array function

    Hi xxx, do you really want to set up an array with either 1000 elements (which is all right) or 1100x1101=more than 1,000,000 elements (seems to be quite a lot..) Be careful! Mic
  15. M

    dlookup problem

    Sure? Sugg: If DLookup(....)=Me!txtPassword then ' nothing Else msgBox .... End If (DLookup returns NULL when not found, which is always interpreted as False!)
  16. M

    Calling A Procedure

    (Really difficult...) You can do like this: All public function(s) are known by SQL-Statements. When your funcs are like this you can choose by: Function test1() test1 = 123 End Function Sub test2() Dim strFunctionName As String Dim rs As Recordset Dim SQL As String Dim...
  17. M

    parsing btwn class modules

    1st: use (temporary) global variables in modules (not class-modules) 2nd: store (temporarily) in (hidden) form, access via Forms!FormName!ControlName 3rd: write public function in source class, call this from target class 4th (slow): store in tables Hope this helps Mic
  18. M

    Largest number in field (unsorted)

    Do this: Set DefaultValue for this field to: =DMax("ContactNumber";"TableContacts")+1 But in fact this doesn't do anything else but looping through all the records - and it's not as fast as Recordset.FindLast(...) (by factor 10 or above...). If you really want to have it fast, you need some...
  19. M

    How do I cancel an event from being carried out??

    There is no "Cancel!"-command for the "GotFocus"-event. Sorry... But there is one for the event OnExit like FieldA_Exit(Cancel as Integer)) or for BeforeUpdate. Just use an other event! But: be careful! The line ElseIf Me!COMMENTS = Not Null Then will always be false, because any expression...
  20. M

    Multiple Select list boxes

    (This is not a multi-select problem.) Obviously you've got two list-boxes and want to add one line from the first to the second on double-click. You need to add that line to the recordSource for the second list-box, i.e. to the table containing data for the second list-box. After that you...
Back
Top Bottom