Search results

  1. T

    Shell or Hyperlink Is there a way to work around spaces in the file name?

    You can use Chr(34) (") to help, like this. Call Shell(SysCmd(acSysCmdAccessDir) & "msaccess.exe " & Chr(34) & "F:\Pooka\I like Rabbits.mdb" & Chr(34) Application.FollowHyperlink Chr(34) & "F:\Pooka\I like Rabbits.mdb" & Chr(34)
  2. T

    What causes a database file size to bloat (file size increase)?

    Here are some more. 1. Add OLE Objects into a db. If you embed pictures or documents to a db, the size will be increased in no time. 2. Open 97 db in 2000 or higher without converting it. This will add some features in so you can open a 97 db in a higher version without a prompt for options...
  3. T

    Expiration date = 1 year from today @ 2:00 AM

    Or try this: =DateAdd("YYYY",1,Date) + CDate("02:00:00 AM")
  4. T

    Expiration date = 1 year from today @ 2:00 AM

    You can use DateAdd() like this. DateAdd("YYYY",1,Now())
  5. T

    exporting to current directory

    You can try name = CurrentProject.Path & "\export" CurrentProject.Path is available for Access 2K or higher. If you use Access 97, try this instead. name = fRelativePath & "export" You'll need the fRelativePath function to help. Function fRelativePath() As String Dim strCurName As...
  6. T

    Importing filenames

    Check this ACC2000: How to Fill a List Box with File Names and Enable Printing of Files from a Form out.
  7. T

    How to obtain server's datetime through ODBC/MySQL?

    If you know the server name you can use Net Time to help. If you want to set the current machine time to the server time, type this in command promt: Net Time \\computer_name /set /yes Learn more about the parameters, type Net Time /? in the command promt.
  8. T

    replacing two spaces with one

    Check this Removing extra spaces out.
  9. T

    Shortcut on desktop

    Yes. Check this Create Shortcut as well.
  10. T

    Running a parameter query through code.

    Thanks Pat. I agree with you about use Where cluase to handle his situation.
  11. T

    Running a parameter query through code.

    So I guess the zqryPriorScore query is not yet parameterized. To do so, in the Query Design view, go to Query menu>Parameters>type in Workunit in Parameter column and select Integer in Data type column. And change the function from: Function FishPriority(iWorkUnitID As Integer) As Recordset...
  12. T

    Shortcut on desktop

    Check this HOWTO: Use Windows Script Host to Create Shortcut with Parameters out.
  13. T

    Running a parameter query through code.

    Your code should work out well. Why don't you feed a fixed value to replace the OpenArgs like this. Private Sub Form_Open(Cancel As Integer) Set Me.Recordset = FishPriority(1) End Sub
  14. T

    capture the year of a date

    You can use DateDiff() like this on the past1 and past2 =DateDiff("yyyy",-2, Me.date_received) =DateDiff("yyyy",-1, Me.date_received) But you don't need to store calculated fields. You can create them on-fly in a query.
  15. T

    erasing content of text file.

    Why don't you just delete the file itself? Or just replace it with a new file with the same name like this. Private Sub ReplaceOldFile() Open "c:\text1.txt" For Output As #1 Close #1 End Sub
  16. T

    too few paramters. expected 3

    Try this out. xlapp.ActiveWorkbook.SaveAs Filename:= _ "C:\"BSSDAR" & Format(Date, "mmddyyyy") & ".xls"
  17. T

    Rename files per table

    The syntax for VBA Name statement is Name OldFileNameWithPath As NewFileNameWithPath Now what you have to do is open the table as a recordset and loop thru the records and change the files name. Private Sub ChangeFilesName() Dim dbs As Object, rst As Object Dim strPath As String...
  18. T

    ALTER TABLE - Format Datatype

    Are you going to use a check box control for the Yes/No field? When you create a form based on a Yes/No field, Microsoft Access uses a check box control as the default control for the Yes/No data type. Predefined and custom formats are ignored when a check box control is used. Therefore, these...
  19. T

    transferdatabase

    Try this. DoCmd.TransferDatabase acImport, "Microsoft Access", "db path", acTable, "temp county", "county"
  20. T

    Delete a table from another database

    Try this code on other db. Private Sub DeleteTable() Dim dbs As Database Set dbs = OpenDatabase("c:\yourtargetdb.mdb") On Error Resume Next dbs.TableDefs.Delete "Table1 " dbs.Close Set dbs = Nothing End Sub
Back
Top Bottom