Search results

  1. ghudson

    Compare values in in two tables fields

    you could use a Dcount() function to test if the value exists in another table
  2. ghudson

    WHY isn't setwarnings *working*!?

    somewhere else in your database you must be turning the warnings back on
  3. ghudson

    Update linked Excel file using VBA

    Instead of working with a linked excel file, I would import the excel data into an access table.
  4. ghudson

    How do I execute my function in a macro?

    I thought I covered that in my first repsonse to your post?
  5. ghudson

    network status

    To test if the front end is connected to the back end you could do a Dcount() on one of the linked tables and you should get an error message if the link table cannot be found. Then you can trap for that error number and give the user a friendly error messge. You could take is a step further...
  6. ghudson

    Autoexec with vba

    Use the Dir() function to verify if the database file already exists. If Dir(\\server\partition\directory\yourfile.mdb) = "" Then Create new file End If
  7. ghudson

    VBA rename table column (almost there)

    This will tell you how many fields are in your table. Since your total field is always on the end, you should be able to do your -1 to find the new column name. MsgBox CurrentDb.TableDefs("YourTable").Fields.Count MsgBox CurrentDb.TableDefs("YourTable").Fields.Count -1
  8. ghudson

    query to convert name to initials

    This should help get you started. Just substitute the comma for a space. Then use the Left() function to grab the first letter. http://support.microsoft.com/kb/95608
  9. ghudson

    How do I execute my function in a macro?

    Is your button really tied to the event that you are trying to run? Place a simple message box in the onclick event of your button to see if the button is working. The error you posted happens when you try to run code directly from the vba editor for a form module. You can only directly run...
  10. ghudson

    Capturing button clicks

    This should help... Error message when you use special characters in Access databases Many developers follow something similar to Leszynski naming convention for naming their database objects.
  11. ghudson

    Capturing button clicks

    You have a serious design flaw in your table structure if you have a separate field for each item that needs to be ordered. You need to have only one field named Items in your table. You can add another field to help identify the items like a Category field if that helps create groups for your...
  12. ghudson

    How do I execute my function in a macro?

    Normally you would need to name an Action as "RunCode" and set the Argument or Function Name to the name of your function in your macro but you have to pass arguments in your custom function and I do not know if macros can do that. I suggest that you use VBA all the way with this step and you...
  13. ghudson

    Multiple User problem

    Your database needs to be split and each user will need their own front end in the version of access that they have installed to their hard drive and each front end is linked to the shared backend. Access 2007 can open older versions of Access databases. It would be best if you could at least...
  14. ghudson

    Capturing button clicks

    Is Glass Cleaners the only item that you need to order? If so then it would make sense to name your field specifically to "Glass_Cleaner". If you need to order various items then you need to be more generic and name the field something like "Items" in the table and the text box would need to...
  15. ghudson

    Capturing button clicks

    You need to have an Item field in your table. Then this line will update that field with the item that needs to be ordered instead of using this line > .Fields("Glass Cleaner").Value = Environ("Glass Cleaner") .Fields("Item").Value = txtItem txtItem needs to be renamed to the name of the...
  16. ghudson

    Newbie help please...

    Your original request above displays VBA coding, not a macro. I use Environ in SQL's and VBA all the time. Here is a short sample... INSERT INTO tblUserLog ( NetworkID, [DateTime] ) SELECT DISTINCT UCase(Environ('UserName')) AS NetworkID, Now() AS [DateTime] FROM tblUserLog; or...
  17. ghudson

    Newbie help please...

    You can simplify it to just one line of code and run it or a variation of it when ever you need it. Function update_history() [job_history] = Environ("UserName") & " , INVOICED" & Chr(13) & Chr(10) End Function
  18. ghudson

    Error trying to open .mht file

    Check out the ShellExecute method I am using to open a file in my Browse [Find a directory or file] sample. Maybe that will work in your situation.
  19. ghudson

    Scolling Text

    The old Scrolling news using a record sample I posted will continue to scroll as long as the form is opened.
  20. ghudson

    Converting Excel to PDF through VBA

    I use PDF995 at home. The FAQs state you can automate it to create PDFs. I have never tried to automate using PDF995 but it sounds like it will do what you want.
Back
Top Bottom