Search results

  1. X

    Checking multiple fields and doing different things based on those results

    I understand that pr2, they are named slightly differently when in my database. I just rename the sensitive parts when I post on here. When I change the dcount to: DCount("[cmb_outcome]", "tbl_log", "[name]= """ & Me.cmb_name & """") = 0 It does the opposite. It knows the user is there, but...
  2. X

    Checking multiple fields and doing different things based on those results

    Yes, that's exactly what I am having to deal with. I have tried your alternative to no success. I believe the issue lies with the criteria part of the dcount. With the last dcount I am trying to count all outcomes that relate to a specific person and only that person. If the number = 0 then...
  3. X

    Checking multiple fields and doing different things based on those results

    So I have got this far, and most of it works horah! If IsNull(Me.cmb_name) And IsNull(Me.cmb_outcome) Then Call MsgBox("You need to select at least one combobox", vbOKOnly, "Information!") Exit Sub End If If Me.cmb_name.ListIndex > -1 Then If DCount("[cmb_name]"...
  4. X

    Checking multiple fields and doing different things based on those results

    Hi all, Basically I am trying to create some code that will check for nulls and then do different things depending on which result it gets. So pseudo code: If cmb_name or cmb_outcome IsNull then Show Message "At least one dropdown must be selected" If cmb_name IsNotNull...
  5. X

    Run Query on successful login

    If that's what you have told your query to do then yes.
  6. X

    Drop Down Query

    That worked 100% CJ_London!
  7. X

    Drop Down Query

    Okay, I have been able to complete what I had set out to do. In the query I added a new column with the following: [Name]=[Forms]![frm_log]![cboComboName] Or [Forms]![frm_log]![cboComboName] Is Null Criteria = True Then on my form I had an unbound combo box, that had a row source of my...
  8. X

    Drop Down Query

    All, I have been getting quite frustrated with this to be honest with you. What I have at the minute: 1. Query: It manipulates my data in two ways: with a [Please enter your FIRST and LAST name:] criteria, and with records with a date less than 1 month from today 2. Form: The form runs...
  9. X

    Record Locks

    The random number was my first step in trying to reduce the chance of two people accessing the same record. It also ensure's that I am being unbaised with the data that is being used. I need the record locking in case two or more people access the same record. That way they know someone...
  10. X

    Record Locks

    Essentially this: http://www.access-programmers.co.uk/forums/showthread.php?t=209679
  11. X

    Record Locks

    Hi all, I have what I think is a very complicated problem. I have a query, that pulls a set of values from a table. The query assigns a random number to all of those values, and each time it is refreshed the random number changes but not the value. The query only returns 2 results. So if...
  12. X

    VBA Validation

    Okay, if I remove the property 'Required: Yes' on the table design, it clears the error. However, I am left with mutliple erroraneous records. Say, you only select both controls on the form (even without saving), and then go to the switch board, you'll have a record in the BE table that...
  13. X

    VBA Validation

    No event is associated with the combo box at all. Control Source: Logged By Row Source: It is selecting the correct table (the properties for all fields here are set to Required: Yes) - which I believe is causing the issue. Bound colum: 1 Limit to List: Yes Allow Value List Edits: No List items...
  14. X

    VBA Validation

    Nope. I'm assuming that Access is doing something at the table level of the form. The reason why I say this is that, whenever you select something from the combo box, delete the selection, and try to select another control, that's when the error handling from the table field comes into play...
  15. X

    VBA Validation

    Okay, Strangely enough, the same thing is happening but in reverse. The text boxes are fine when you put something in them, delete it and then check the form. When you do the same (select something and then delete it) with the combo boxes, the code doesn't check it, and instead the access...
  16. X

    VBA Validation

    So many ways of doing the same things. :rolleyes: Thanks all. Will go and try this out.
  17. X

    VBA Validation

    Okay, Had to bodge it a bit: Me.txt_date.SetFocus If (Len(Trim(txt_date.Text)) = 0) Then lresponse = MsgBox("Please insert today's date", vbOKOnly, "Warning!") Else Me.txt_call_ref.SetFocus If (Len(Trim(txt_call_ref.Text)) = 0) Then lresponse = MsgBox("Please insert a call reference...
  18. X

    VBA Validation

    No joy. When I do that it brings up a runtime error of 2815, which is fine. I can assign the set focus property to the control and it will work fine, with no issues at all, but I have to split my code out from the elseifs. Me.txt_date.SetFocus If (Len(Trim(txt_date.Text)) = 0) Then lresponse...
  19. X

    VBA Validation

    Yeah, I know. I'm having the same issue with my other forms. It's just trying to get the time to get all the forms with their proper naming convention and to ensure it doesn't break something elsewhere. I'll try that, and come back to you. Thank you.
  20. X

    VBA Validation

    Date and Call Ref are text boxes, yes. However Logged By is a Combo Box.
Back
Top Bottom