Recent content by Vbark

  1. V

    Parameter Query

    When you open a query with paramaters as a recordset you need to do this Dim qdf As DAO.QueryDef Dim rs As DAO.Recordset Set qdf = DBEngine(0)(0).QueryDefs("YourQueryName") qdf("[Forms]![frmOutput]![ParamaterOne]") = getthevalue1 qdf("[Forms]![frmOutput]![ParamaterTwo]") =...
  2. V

    How Do I............

    Actually to take that one step further the next step you would select member id and surname, next yes to hide key column, next then finish.
  3. V

    How Do I............

    Try adding a list box or combo box to the form, it must have the record source set as the one you wish to query, the wizzard pops up, you have three options choose the bottom one and see how you get on. let me know if you get stuck...
  4. V

    Importing text file

    It looks like it is treating all of the fields as one. Try setting up an import specification when you manually import the file, then on the last or second to last tab click advanced and save as, the name that you save the import spec as put in between the commas. acImportDelim, , "visiongeneral"
  5. V

    Filter subform based on combo box selections

    Try this example.... in access 2000....
  6. V

    Capturing UserName and Populating a Name Field

    If you give me your email address I will send you a working copy.
  7. V

    Query with Paramater

    Like this, you need to start with a query then open recordset from there Private Sub MyTest() On Error GoTo Err_MyTest Dim dbs As Database Dim rs As Recordset Dim x As Integer x = 0 Set dbs = CurrentDb '--new code Dim qdf As QueryDef Set qdf =...
  8. V

    help to take value into a variable

    sorry last one again... or with no Where x = nz(dcount("YourPrimaryKeyField","YourTable" ) ,0)
  9. V

    help to take value into a variable

    Try this.. if y is a number then x = nz(dcount("YourPrimaryKeyField","YourTable","WhichEverField=" & y ) ,0) if y is a string then x = nz(dcount("YourPrimaryKeyField","YourTable","WhichEverField='" & y & "'" ) ,0) or with no Where x = nz(dcount("YourPrimaryKeyField","YourTable", ) ,0)
  10. V

    Capturing UserName and Populating a Name Field

    Where to start :-) * Your employee table should contain a field that contains the nt login you will need to add it if not there, this is used to look up the record that you require, call it what you want and replace the 'NTLoginField' with what you called it. * Your form should have a data...
  11. V

    Filter subform based on combo box selections

    Not sure a few things to check. Exactly which line did it break on? The subform control has enabled and locked properties they should be enabled = yes and locked = no that seems the most likely for that error message. Another thing is the subform control doesn't necessarily have the same...
  12. V

    Set Calendar Control Date other than Today

    So all sorted then?
  13. V

    Capturing UserName and Populating a Name Field

    Sorry I re-read your message. What I normally do with this is, have a form that runs on the database open linked to the tblemployees table logic being someting like Private Sub Form_Open(Cancel As Integer) Dim RetVal As Long RetVal = Nz(DLookup("UserID", "tblemployees"...
  14. V

    Capturing UserName and Populating a Name Field

    In Default of the username field you can put =Environ("UserName") to return the nt login, this can also be used in a function like this Public Function GetUserName() as String GetUserName =Environ("UserName") End Function
Top Bottom