Search results

  1. Z

    Prevent duplicate data entry as soon as entered

    Hmmmm, I still dont get any message when I try and go to another field. The name of the field in my table is [ENCON], I tried using that where you added the red text and I tried "" as well. Not really sure tht I fully understand what is going on. -Z Is it perhaps that beforeupdate is the...
  2. Z

    Prevent duplicate data entry as soon as entered

    Hi there, I have a form for data entry, there is a field called "ENCON" that is basically the number of an incident, and is also my primary key. Is there a way to prevent duplicate entries? If I fill out the whole form with a duplicate ENCON # and try to add it, I get a run time error...
  3. Z

    Preventing unwanted edits

    I have tried putting this code into my subform: Private Sub Risk_Data_Query_subform_BeforeUpdate(Cancel As Integer) If Me.Dirty = True Then If MsgBox("Changes have been made to this record, do you wish to save these changes?") = vbNo Then 'If no then undo unsaved...
  4. Z

    Preventing unwanted edits

    I have been looking but unable to find what I am looking for. Playing with it for a bit I think I know wht I want to happen. I would like access to look at the ondirty property of the subform whenever the record is changed, or the form or subform is closed, and ask whether the changes should...
  5. Z

    Preventing unwanted edits

    Hi there, Me again! I am trying to prevent my database from falling victim to unwanted/inadvertent edits. I have it set up so that there are command buttons in my subform (Im talking about a search form with a subform displaying results) that either cancel changes, or save them. There is...
  6. Z

    Problems with navigation Buttons

    Sorry, figured this out, please delete thread. :p
  7. Z

    Problems with navigation Buttons

    Hi there I have a search form that returns records from my table into a subform in form view. The only way that the records are cycled through right now are with the use of the mousewheel. I have the nav buttons for the form set to "yes" on the nav button display it says that there is...
  8. Z

    Creating a search form (having problems)

    D'oh! Thanks bob! All fixed!
  9. Z

    Creating a search form (having problems)

    Hi guys! When I try and filter by date When I try and filter using dates with this code: Const conJetDate = "\#mm\/dd\/yyyy\#" 'Search within a date range If Not IsNull(Me.txtStartDate) Then strWhere = strWhere & "([Date] " & Format(Me.txtStartDate, conJetDate) & ") AND "...
  10. Z

    Creating a search form (having problems)

    I have solved everything except the for the date filter, but I think I with just forego that for now. The last part of this is that I'd like to make it so that once these records are searched out and displayed, that they can be edited. I would like to have it so that the user needs to use...
  11. Z

    Creating a search form (having problems)

    I was able to fix my Resolved/Unresolved filter by changing: strWhere = strWhere & "([Resolved or Pending] = 1) AND " ElseIf Me.cboResolved = "Unresolved" Then strWhere = strWhere & "([Resolved or Pending] = 2) AND " To: If Me.cboResolved = "Resolved" Then strWhere =...
  12. Z

    Creating a search form (having problems)

    3. Issue True is stored as -1 and False as 0 Not 1 and 2 strWhere = strWhere & "([Resolved or Pending] = 1) AND " ElseIf Me.cboResolved = "Unresolved" Then strWhere = strWhere & "([Resolved or Pending] = 2) AND " Your date issue could be txtStartDate and txtEndDate on your...
  13. Z

    Creating a search form (having problems)

    Ive worked out some of the kinks, but I can't seem to get the code that search by [Name] with the "like" function to work correct 'Search by name If Not IsNull(Me.txtName) Then strWhere = strWhere & "([Name] = Like ""*" & Me.txtName & "*"") AND " End If I also can't seem to...
  14. Z

    Creating a search form (having problems)

    My Dummy Form at home seems to be working! (There are still a few kinks, some of which you may hear about :-) ) Thank you so very much!! :D:D:D:D:D
  15. Z

    Creating a search form (having problems)

    Now when I try it I seem to get the error: Runtime error '3075' Syntax error in the string in query expression '([ENCON] = 2012341)' But I get the same error no matter which criterion I try to search by. Highlighted in the debugger is this line Me.Risk_Data_Query_subform.Form.Filter =...
  16. Z

    Creating a search form (having problems)

    JanR, thanks I guess it's worth a shot. Here is the database trimmed down to 2 records and only the non-archive table. -Z
  17. Z

    Creating a search form (having problems)

    Im totally open to doing this an easier way. All I need is the structure to search for records that match all criteria, return them in such a way that a couple of the fields are displayed for editing. If you have a suggestion on the best way to accomplish that, I'd be more than willing to...
  18. Z

    Creating a search form (having problems)

    Saw the edit after my previous post, with this code the error I get is "Runtime error 2448, you can't assign a value to this object." edit: No worries about the typo, helps me to learn :)
  19. Z

    Creating a search form (having problems)

    When I try this I get a "Compile error, Method or Data Member not found" that seems to highlight the first "filter" bit of code. -Z
  20. Z

    Creating a search form (having problems)

    Hi there, I am very new to MS Access and to VBA. I am developing a database to keep track of adverse incidents in the workplace. I have a form that adds them to the database that works just great, but now I want to build a form that lets users look-up and update (for follow-up purposes)...
Back
Top Bottom