Search results

  1. E

    NEWBIE Q - Amending Standard Messages

    First of all, is the event triggering? Go to design view of your form. Look in properties, and see if the event is listed as a Event Procedure. Click on the ... to see the code behind the event. If you have made it that far, toggle a breakpoint in the procedure. Then run your form and make...
  2. E

    NEWBIE Q - Amending Standard Messages

    Try the Form's OnError event. Not sure if it even triggers with this error message, but if it does you should be able to cancel it, and place your own error message there. Evan
  3. E

    Controlling the return or enter key in controls

    Under Properties in memo fields there is an option for Enter = New Line OR Enter = Next Field. If this won't do it for you, you may have to use the KeyDown event of your control, and intercept the Key event. Evan
  4. E

    Merging table with no IDs into table with IDs

    OK, here's another approach: Create a tempory table in Access with the same fields as your Excel files, and copy and paste all 40 files into your table. Then create your permanent tables: tblEmployee - EmployeeID, FirstName, LastName tblMeeting - MeetingID, MeetingTime, etc...
  5. E

    Corruption!!

    Also remember, if you get "Not enough memory to perform this operation" error, exit Acces without saving any open forms. This will limit the number of corrupt forms that you have to deal with. Evan
  6. E

    Merging table with no IDs into table with IDs

    Why don't you copy all 40 excel files into 1 file. Then do the process 1 time? I still think you could get it done much faster than coding a VBA automated solution. Evan
  7. E

    List Box

    I agree. If your tables are created properly, you should have a unique ID for each record. You may list as many fields as you like from a record in a listbox, and as long as your listbox is bound to the ID for the record, you can use it to retreive any related data. You question, as I...
  8. E

    Stay in box after error message

    It doesn't matter where you put the SetFocus command, because after all the code in your AfterUpdate event has run, THEN the tab key pressed by the user will be processed. Also, Cancel has no meaning in the AfterUpdate event. Use the code you posted with the BeforeUpdate event. It should work...
  9. E

    Open a form full screen

    I borrowed from some other people's code and developed what I call a 'Soft Maximize' option. I didn't want to do a normal Maximize, because then every form is maximized. I simply wanted some of my forms to use ALL of the available screen. If this is what you want, put the following code in a...
  10. E

    Limit/force date entry

    I finished my post and then saw that you had changed your question. I edited my first response to answer it. Evan
  11. E

    Limit/force date entry

    In the BeforeUpdate event of your ClosedDate field: If ClosedDate > Date()+7 then Msgbox "You may not enter a future date!" Cancel = True ClosedDate.Undo End If This should do it. Evan
  12. E

    Popup message based on a field value

    No problem - glad to help! Evan
  13. E

    Problem with query syntax

    Semi-colon at the end?
  14. E

    Merging table with no IDs into table with IDs

    Here's a thought: Copy your Access table with Employee Names and IDs into your excel file. Sort everything by Employee Name. Copy and paste the IDs from the single record that has the ID to all the others. Paste the results back into your attendance table. This will probably be just as fast...
  15. E

    Creating an error script

    First of all, I would suggest using Allen Browne's error handling code: http://allenbrowne.com/ser-23b.html For this to work properly you will have to add a few lines of code to EVERY procedure. It will be worth the work. Allen's code will log every error that happens behind the scenes in...
  16. E

    Popup message based on a field value

    You are very close, but rather than just tell you the answer, I will try to explain the logic behind it. First of all, 'Answer' is an undeclared variable that has no value. Second, at the very top of your VBA code window you will find the global definitions area (It says Option Compare...
  17. E

    Popup message based on a field value

    Yes, You will want to create another form with your query as the recordsource. Set its default view to datasheet. In your query, in the clientID column, put: Forms!YourFirstFormName!YourComboBoxName in its criteria field. In otherwords, the only records returned by the query will be the...
  18. E

    Return to form

    Why do you have to close the form? Why not just hide it? Me.Visible = False Evan
  19. E

    Popup message based on a field value

    First, I will assume that you also have a Clients table and a unique ID for each client. Your Combo box that lists clients needs to use this ClientID as its first column (you can use the columnwidth property to hide the ID). If all this is in order than the following will work for you: Put...
  20. E

    Help building a two level query

    This is a bit over my head, but it sounds like you are looking for a recursive query. Try searching for "recursive employee". There are many helpful articles that deal with similar scenarios. Evan
Back
Top Bottom