Search results

  1. ghudson

    Exporting Queries to Various worksheets

    To add the date time to the file name I would use something like this... dim sPath as string dim sFile as string dim sDateTime as string dim sExtension as string dim sPathFile as string sPath = "\\Nnorsogfas031\Design\99 AK Files\DCE Weekly Reports\Access Queries\" sFile = "WeeklyData_"...
  2. ghudson

    Exporting Queries to Various worksheets

    http://msdn.microsoft.com/en-us/library/bb214134(office.12).aspx Use the transfershpreadsheet function. Each query will output to a new worksheet. The worksheet will be named the name of the query. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "YourQuery1"...
  3. ghudson

    Show a field based on 3 possible options

    I would use a select case statement. Is the ID field a text field or a number field? If number then this will work in the after update event of your combo box... Private Sub cboSchool_AfterUpdate() Select Case cboSchool Case 2, 3, 5 Me.txtSchool.Visible = True...
  4. ghudson

    Gotorecord unfilled subform

    Sounds like you want to filter the forms records to only show the records that have no data in the Product field. If so, then work on how to filter your records with that criteria. I would not make the form open up to the filtered records. I would add a command button that the user has to...
  5. ghudson

    help with the string in vba

    Usually you can substitute the double quotes for single quotes to run the SQL in VBA. If not then you will have to build it using the Chr(34) code in the appropriate spots. Passing the SQL srting to the debugger helps you see what you are building in the immediate window. Debug.Print SQL
  6. ghudson

    define an action if no records exist

    You can also count the records in the form on open... If Me.RecordsetClone.RecordCount = 0 Then
  7. ghudson

    Goto Record/Find Record

    You can change the field names in the query. Instead of having three versions of the ID field you would have three variations. Table1ID, Table2ID, Table3ID, etc. That should help with your error.
  8. ghudson

    Where would I arrange things fe/be-wise?

    This simple command will purge the records in your table. Use brackets if your table name has a space in it. [Your Table Name Here] CurrentDb().Execute "DELETE * FROM YourTableNameHere" Then run your append SQL... DoCmd.SetWarnings False DoCmd.RunSQL ("INSERT INTO YourTable ( [Account...
  9. ghudson

    Where would I arrange things fe/be-wise?

    It reduces bloat and prevents any problems if an object [query, form, report] is bound to the table you are replacing if the make table procedure fails.
  10. ghudson

    Where would I arrange things fe/be-wise?

    It is best to empty the table then append the data to the table instead of making the table each time you need to refresh the data.
  11. ghudson

    Error Checking sometimes crashes

    I never use the form error event. I always have error trapping in each event which allows me to customize the way I want to handle the errors per event. Private Sub cboFindFirstName_AfterUpdate() On Error GoTo Err_cboFindFirstName_AfterUpdate Me.FilterOn = False...
  12. ghudson

    Alerting connected users

    Using a hidden form with the timer is your best bet since the users will be in other forms within your database. I still suggest using a form that pops up with a listing of the new records. Timers can bog down a computers CPU so I would only check for new records every 60 seconds. Have the...
  13. ghudson

    Dynamically loading Redemption.dll

    Try using the Silent switch. Shell "RegSvr32 /S C:\WINDOWS\SYSTEM32\Redemption.dll"
  14. ghudson

    Alerting connected users

    I would still advise against using a message box since the user might be in the middle of typing or doing something and the message box could be closed before the user had a chance to read it. Using a custom form set to pop up and modal or have a message displaying in the status bar of the form...
  15. ghudson

    Alerting connected users

    If I was a user of your db, I prefer that you load a form (once every 60 or 30 minutes) that lists all the new records created for the current day. Then have a button beside each record so that I can jump to that record if I want. Having a message box pop up every few seconds each time a new...
  16. ghudson

    Hyper-link Problem

    Use the debugger and see what the completed string looks like. Add this line to your code before you call the hyperlink. debug.print "\\londcfs1\Data\" & txtNumber & ".xls" If you can copy and paste the value from the Immediate window into windows explorer then you are good to go. If not...
  17. ghudson

    Hyper-link Problem

    If the contract number has the value = to the file name then you would reference the text box that has that value to build the path file name as a string. Application.FollowHyperlink "\\Server\Partitiion\Directory\" & txtContractNumber & ".xls", , True
  18. ghudson

    SubForm Show History of input

    At the end of the coded event that you use to enter a new record (afterupdate, oncurrent, save, etc?) in your parent form, you need to call the command to requery your subform. Me.YourSubFormNameHere.Requery This might help... http://www.techonthenet.com/access/subforms/refresh.php
  19. ghudson

    SubForm Show History of input

    You need to requery the subform to display the new record.
  20. ghudson

    Hyper-link Problem

    You can use the Application.FollowHyperlink funtion. http://msdn.microsoft.com/en-us/library/aa221236(office.11).aspx Application.FollowHyperlink "x:\yourfile\123.xls", , True
Back
Top Bottom