Recent content by NBRJ

  1. N

    Updating fields from multi-select listbox based on a GROUP BY query

    Thank you! I've been playing with this while you posted this and got this almost fixed... thank you so much for both your assitance. Clearly trying to this after long working days late at night all this week is my main problem. Clear head after 10 hours sleep and I did it in under an hour. I...
  2. N

    Updating fields from multi-select listbox based on a GROUP BY query

    That query is based on one table - it's since become necessary to filter it by it's parent too :(
  3. N

    Updating fields from multi-select listbox based on a GROUP BY query

    I have a form, with a multiselect listbox that is displaying data from a GROUP BY query, which itself pulls data from more than one (related) tables. What I want to be able to do, is for selected listbox entries find the matching records in one of the tables used in the query and run an update...
  4. N

    group query listbox - amend each record represented by grouped listbox item(s)

    ah-ha, I was just thinking about trying that, I'm glad I was on the right lines. I basically take the column data in the selected grouped list item, find the records that match that content and then append... I can pull in the FIDs of the fields and keep them hidden from the list and do it via...
  5. N

    group query listbox - amend each record represented by grouped listbox item(s)

    I have a listbox on a form that is based off a grouped query. For example: Listbox: lstRequestedSoftwareAmalgamated Query: qRequestedSoftwareAmalgamated, with the following fields grouped: Title (group by) Version (group by) ConfigInfo (group by) [other grouped fields...] Locations (count of...
  6. N

    Prevent APPEND when certain fields match in a query

    Ok solved it. That worked, except for a tweak to the reference to lstLocation in the DCount. I had just put lstLocation instead of : If DCount("*", "qRequestDUPLICATECHECK", "[FIDAcademicYear] = " & (txtSelectedRequestAYear) & " AND [FIDFaculty] = " & (txtSelectedRequestFaculty) & " AND...
  7. N

    Prevent APPEND when certain fields match in a query

    Not near the DB at the moment... how does this look? For unselected list (I already have code to check for that) Dim intX As Integer Dim countOfMatchingRecs As Integer countOfMatchingRecs = 0 For intX = 0 To Me.lstLocation.ListCount - 1 If DCount("*", "qRequestDUPLICATECHECK"...
  8. N

    Prevent APPEND when certain fields match in a query

    How does that work if I have a list? Unbound Form Fields --------- QueryName.Field cboRequestAYear -------------- qRequestDUPLICATECHECK.FIDAcademicYear cboFaculty -------------------- qRequestDUPLICATECHECK.FIDFaculty cboTitle -----------------------...
  9. N

    Prevent APPEND when certain fields match in a query

    Arrgh, sorry, most important info, one of the form fields I need to use in that duplicate check is a listbox, lstLocation. When the user clicks add, if the listbox is NOT selected it will add a record for each of the records in that list. Alternatively if the list IS selected it will add a...
  10. N

    Prevent APPEND when certain fields match in a query

    I have a unbound form to add data into a table. I have an ADD button which then adds in the field data on the form into the relevent table (these form fields are lookups to other tables, so the data that will be appended will be all ID numbers). I have a query called qRequestDuplicateCheck...
  11. N

    Editing Foreign IDs in cboboxes causing ophan records

    It's ok, I'm happy with the design based on what the database required to do. It was just there as an example regarding cbo's and the Null value after deletion on the form, which was the problem I was asking about, but I've worked around that now.
  12. N

    Editing Foreign IDs in cboboxes causing ophan records

    Well the relationship diagram doesn't look that complicated for those tables (attached) - I can't see the confusion. The database design is documented and all tables, fields, etc have a description next to them plus example logic. A staff member must be a member of a faculty. School and...
  13. N

    Editing Foreign IDs in cboboxes causing ophan records

    I've just tried this type of thing after an update:Private Sub cboFIDSubject_AfterUpdate() If IsNull(cboFIDSubject) Then cboFIDSubject = 0 cboFIDSpecialism = 0 'child table (tSpecialism) of tSubject. ElseIf (cboFIDSubject) = 0 Then cboFIDSpecialism = 0 ElseIf (cboFIDSubject) > 0...
  14. N

    Editing Foreign IDs in cboboxes causing ophan records

    Not sure if this is best here or in Theory and practice of database design? It's causing me massive problems on forms so here unless mods think otherwise. ------------------------------ I have had an issue with orphaned records today and I'm, first, massively panicked, and then I'm hoping...
  15. N

    Searching middle form of 3-linked subforms on a unbound main form

    Here's what I've done so far, I just passed the variables in order of the forms, i.e. parent to child. from fSoftwareItem (the unbound form where the Title seach box is) it passes the search results. An empty field will result in all the title records. Private Sub FilterTitle() Dim...
Top Bottom