Search results

  1. ghudson

    Color current record

    You do realize that you just replied to a dead thread that is over 10 years old?
  2. ghudson

    Copy Folder problem

    sDestinationDir = Me.YourTextBox
  3. ghudson

    Search for and upload a file to a specific location using a command button

    Sorry I do not have the time to write the code for you but you can use the Name Statement function with my (9 year old) Browse [Find a directory or file] sample to move a selected file. Check out this old Rename and move file to an existing folder thread that I relied too back in 2004 for an...
  4. ghudson

    Set mdw file at startup

    You're welcome. I am glad it helped you out of a jam and thanks for taking the time to thank me. :cool:
  5. ghudson

    How to build a SetFocus command

    Yes that works! Thank you Paul!!!
  6. ghudson

    How to build a SetFocus command

    How can I build a SetFocus command on the fly? I am creating a Find form where the user can select their options. I am building the listing of options for the user to select from based on which form opened the Find form. All forms are set as Modal and PopUp so I have to set the focus to the...
  7. ghudson

    DoCmd.OutputTo: Store path location selected by user to a string

    Maybe this sample will help get you started... Browse [Find a directory or file]
  8. ghudson

    Browse Picture from desktop and Insert into Database

    Maybe this sample will help get you started... Browse [Find a directory or file]
  9. ghudson

    VBA code for counting number of records loaded in a form

    Thank you RuralGuy! That has been quirking me until I found your Me.RecordsetClone.MoveLast suggestion to fix a form that would always give me a total record count of 1 in my custom X of Y counter using Me.RecordsetClone.RecordCount when the form is first opened. I cannot use DoCmd.RunCommand...
  10. ghudson

    Change date criteria depending on the day of the month the query is run

    I do not understand the AND X part of your example. (Day(Date())=1 AND X Between #1/1/2013# And #1/31/2013#) OR (NOT Day(Date())=1 AND X Between #2/1/2013# And #2/28/2013#) Why does this not work in a query for a date criteria? Separately they work fine. IIf(Day(Now())=1,Between #1/1/2013#...
  11. ghudson

    Change date criteria depending on the day of the month the query is run

    This one has me stumped. I am trying to change the date criteria in a select query if the day of the month is the 1st day or not. If it is the 1st day of the month then I want the date criteria to be between the 1st and last day of the previous month. If the current day is not the 1st day of...
  12. ghudson

    Is Putting Double Quotes in a String possible?

    I agree! Use Chr(34) but I do get headaches when trying to code out a long SQL in VBA that involves DLookups that need quotes.
  13. ghudson

    Create an Excel spreadsheet

    You can output a query or table to an excel file and allow the user to define the name and location. But as Vassago mentioned, it is best to define the location and name so that you can control the outcome of the output. DoCmd.OutputTo acOutputQuery, "YourQueryNameHere"...
  14. ghudson

    OutputTo PDF in form

    You put the code in the event when you want it run.
  15. ghudson

    VBA Userform

    If the lines in red are your errors then it is odd that the only objects you have named is causing the problem. You need to rename your objects (labels, text boxes, etc) with something meaningfull and give them a prefix that identifies what it is. text box = txtTextBoxName, label =...
  16. ghudson

    PLS TELL ME WHAT IM DOING WRONG!Need DataEntry form to addrecord AFTER pressing SAVE!

    In the design of the table you can set the "Required" property to Yes to ensure all of the required fields are completed before the record can be saved. The A better mouse trap? sample might give you some ideas on how to ensure the user does what you want before they can save the record.
  17. ghudson

    Building an array if file exists

    Check out the Browse [Find a directory or file] sample on how to loop through a directory of files. If Dir(FileLocation) <> "" Then 'the file exists Else 'the file does not exists End If
  18. ghudson

    OutputTo PDF in form

    First you have to set the focus to another object since the button will have the focus once you clicked it. Then you can hide the button. But I have to ask why you are saving the form to a PDF instead of using a report based on the data in the form and output the report to PDF instead...
  19. ghudson

    Correction using undo function

    This should give you an idea on how to use an Undo function... If MsgBox("Do you want to Undo the unsaved changes you have made to the current record?", vbQuestion + vbYesNo, "Undo Changes") = vbYes Then If Me.Dirty Then DoCmd.RunCommand acCmdUndo Else...
  20. ghudson

    disable outlook security dialogue box

    Do not use the DoCmd.SendObject method. Search for CreateObject("Outlook.Application") and you should find some examples on how to send emails that avoid the outlook security warnings.
Top Bottom