Search results

  1. Z

    Radio boxes and what they record

    Thanks JANR, I have decided to just include an option ground right in my search form now, seem simpler. -Z
  2. Z

    Radio boxes and what they record

    How can I get that done? -Z
  3. Z

    Radio boxes and what they record

    I have a form that contains an 2 radio boxes for the user to specify whether a record is "resolved or unresolved". Currently this value comes out as a 1 or 2 in my table. Is there a way to record them as "Resolved" and "Unresolved". I have another form to edit existing records, and 1's and 2's...
  4. Z

    Standard Screen Coverage?

    Hi there, I doubt there is a simple solution to this but I'll ask anyways. Some of my database users have different monitor sizes and resolutions. On my large screen and large resolution, my entire forms fit on the page without scroll bars, but some of the other users have to scroll...
  5. Z

    Prevent duplicate data entry as soon as entered

    No, it is rmENCON I see my mistake now. This code works perfectly: Private Sub rmENCON_BeforeUpdate(Cancel As Integer) Dim items As Long items = DCount("*", "Risk_Data", "[Encon] = " & Forms!Enter_New_Incident!rmENCON) If items > 0 Then Me.Undo MsgBox "ENCON Already...
  6. Z

    Prevent duplicate data entry as soon as entered

    It is a combobox, and I have deliberately entered a duplicate value each time I have tested it. -Z
  7. Z

    Prevent duplicate data entry as soon as entered

    Trying: msgbox DCount("*", "Risk_Data", "[Encon] = " & forms!Enter_new_Incident!ENCON) Gives me: run-time error '3075': Syntax error (missing operator) in query expression '[Encon] = '. When I try: msgbox me.ENCON I get... Run-time error '94' Invalid use of null -Z
  8. Z

    Prevent duplicate data entry as soon as entered

    Gives me run-time error '3075': Syntax error (missing operator) in query expression '[Encon] = '.
  9. Z

    Prevent duplicate data entry as soon as entered

    Works like a charm.
  10. Z

    Prevent duplicate data entry as soon as entered

    That works in theory, but if I can make an error message pop-up before the user goes through all the trouble of filling out each field (there are alot) then it would save mucho timo. -Z
  11. Z

    Prevent duplicate data entry as soon as entered

    Private Sub rmENCON_BeforeUpdate(Cancel As Integer) Dim items As Long items = DCount("*", "Risk_Data", "[Encon] = " & Me.ENCON) If items > 0 Then Me.Undo MsgBox "ENCON Already exists in database" End If End Sub With this code I still get the same error...
  12. Z

    Prevent duplicate data entry as soon as entered

    Yes, my code is in the before_update of the rmENCON box. Doesnt this mean that that event is firing for it to show me an error?
  13. Z

    Prevent duplicate data entry as soon as entered

    The event does fire now I think, the error messages I am getting come as soon as I leave the rmENCON combobox control -Z
  14. Z

    Prevent duplicate data entry as soon as entered

    Ok, I am a total idiot. I was mis-naming my combobox......fixed I still get errors when I try and enter duplicate data however. Private Sub rmENCON_BeforeUpdate(Cancel As Integer) Dim items As Long items = DCount("*", "Risk_Data", "[Encon] =" & Me.ENCON) If items > 0 Then...
  15. Z

    Prevent duplicate data entry as soon as entered

    I use a command button: Private Sub rmAddIncident_Click() Dim err As Integer Dim cnn1 As ADODB.Connection Dim Risk_Data As ADODB.Recordset Dim strCnn As String 'Check that all fields are filled in rmENCON.SetFocus If rmENCON.Text = "" Then err = err + 1 MsgBox "Please fill in the...
  16. Z

    Prevent duplicate data entry as soon as entered

    No that doesnt work either. Kinda seems to me like the code isn't even checking for something. Should this code go to work as soon as I dirty up cboENCON and click on another control? -Z
  17. Z

    Prevent duplicate data entry as soon as entered

    My form is unbound. Will that have an effect on what Im trying to do?
  18. Z

    Prevent duplicate data entry as soon as entered

    Yes, number format.
  19. Z

    Prevent duplicate data entry as soon as entered

    Nope, still isnt working :confused: I hope I was clear enough in my goal, I want to prevent the user from entering an ENCON number that is already in the database (they are unique numbers from sheets). And I want a message to pop up as soon as there is a duplicate number in the combobox...
  20. Z

    Prevent duplicate data entry as soon as entered

    Sure Private Sub cboENCON_BeforeUpdate(Cancel As Integer) Dim items As Long items = DCount("*", "Risk_Data", "[Encon] = " & "") If items > 0 Then Me.Undo MsgBox "ENCON Already exists in database" End If End Sub I have also tried [ENCON] in place of "" -Z
Back
Top Bottom