Search results

  1. M

    Query using one text box with multiple entries

    Ok, think I understand what you're trying to do. Maybe you can try something along the following lines: assign the input from your text box to a string in VBA. Use the split function to split the string on the commas and assign the values to an array. Loop through the array and for each value...
  2. M

    Query using one text box with multiple entries

    Can you be a bit more specific about what you need your query to do? Do you use the text box to provide parameters for the query? If that is the case, you're better off providing a text box for each parameter. If you are trying to query a text field that has multiple values in it, you really...
  3. M

    Macro-shortcut to insert Date and Time

    When you're in design view, select the button and use the right-click menu to open the properties for the button. Go to the event tab and select the On Click event. This will open the Choose builder window. In there, choose code builder. Paste the code in my above post between the provided...
  4. M

    Macro-shortcut to insert Date and Time

    Ok, I see the problem... If you have room on your form for a button, you could add the code to the on-click event for the button instead of the update event of the memo field. You could then give the button a caption like "&insert" (this underlines the letter i, indicating that alt+i is the...
  5. M

    create/open folder and word doc with folder name

    In the VBA editor, under references, make sure the Microsoft Office and Microsoft Word library are checked. That should hopefully do the trick.
  6. M

    create/open folder and word doc with folder name

    How about something like this? Dim App As New Word.Application Dim Doc As New Word.Document Dim Number As Integer Dim strEventPhotos As String Number = Me.ID ' Define in one place, use in three. strEventPhotos = "C:\Docs\" & Number If...
  7. M

    Excel Import Causing Numeric Overflow Error

    And it's the same Access table too, right? And none of the other people on this drive have the same problem? Hmm, sounds like one of those times Access comes up with an incorrect error number... If the path name is the only thing that is different, there's probably something gone wrong there...
  8. M

    Excel Import Causing Numeric Overflow Error

    Are they trying to upload the same Excel file? If not, then the problem may be in the Excel file. That error message tends crops up when there's more then one data type in a column. Access guesses the data type based on the first few rows of data, if there's a surprise data type further...
  9. M

    Macro-shortcut to insert Date and Time

    I don't know of any way to run VBA-code using a keyboard short-cut, but that may be me ;-) What you could try is add an after update event to your memo field that appends your date/time bit at the end of the text in the field. The code would automatically run each time the memo field is...
  10. M

    Macro-shortcut to insert Date and Time

    You may not need a macro to do that. I think you can just set the input mask of the form (or the underlying field) to something like: 90\->L<LL\-90/00:00";";; That way, people using your form will be forced to enter the data in the format you want (in the above example: (d)d-mmm-yy/(h)h:mm...
  11. M

    Calling a VBA function from Access 2010 data macro

    I'm using Windows 7 with Access 2010 and Access 2013. I use data macros to create a new record in an "Audit table" whenever a new record is inserted into a table in my database. One of the fields in this audit table is filled with the windows username of the person inserting a record in a...
  12. M

    Hello All

    Cheery wave from England! I've worked with databases quite a bit, but I'm new to user-forms and VBA. So I was hoping to pick up some helpful hints and tips about user interfaces and VBA here, and maybe help solve some query questions.
Back
Top Bottom