Search results

  1. R

    Updating Related Table

    Updating related table....more than one field Hi there, I have the following code: Public Function AddToSource(tbl As String, fld2update As String, NewData As String) As Integer 'Adds record to the list if not already present 'This only works if there is just one field to update.... Dim...
  2. R

    What am I missing....

    Thanks Pat, I had just worked that out, and as you correctly say elsewhere; must have the table design right and the relationships. That way I got it to do all I wanted with an ability to manually checked edited and duplicate records across multi-linked tables.
  3. R

    What am I missing....

    Being away from my database I've forgotten a basic command (....getting too old??). Here's my sql" SELECT GOVT_ACTOnly.FULLNAME, GOVT_ACTOnly.GazDate, GOVT_ACTOnly.GazNr, GOVT_ACTOnly.Name_ID, GOVDOUG.F25_ALLTAGS, GOVDOUG.EditedTag, GOVDOUG.F4_Deletes FROM GOVT_ACTOnly INNER JOIN GOVDOUG ON...
  4. R

    Duplicate value message

    You state at the outset you are getting the Access command, which means you are trying to enter a new record in a related table, which needs to be added separately first. I have some code from some of our good friends here (Pat Cowley, Fornation, Jack Cowley and Doug) which shows me : "IF J...
  5. R

    keeping track of last 'n' records viewed

    Returning to Access after a long break, I've a need similar to this one. I've a current date for date entered and want to have an "Edited" field for date edited. Seems a long-winded way to have to run a query, when surely I could create a second date field, which onfocus or onclick will add the...
  6. R

    Take Out Duplicates

    Taking Out Duplicates, and Updating one field In my duplicates, my query compares 4 fields before selecting the duplicate set. In 2 of the 4 fields I have old data, which I want to transfer to the kept record e.g. Old Record: Ms, JA, Jenny, Smith, TitleX1, ABC26, 1/2/03 Later Record...
  7. R

    Conditional Updating of Duplicate Record Set

    This is probably a case for vb. I run a dupes query based on 3-4 fields. Field 1stname and Field Salute (Mr, Ms) is often blank in the newer record but not in older record. I want to update new recs such that blanks in newer dupe are filled. Any ideas? Here's the query sql SELECT...
  8. R

    Random selections

    I still keep getting on this field in my table UNDEFINED FUNCTION on AssignNumbers deptCitySalaryNumber: AssignNumbers([deptcity])
  9. R

    Top Ten

    Thanks your input. I have some code, and still tryin to get that working correctly.
  10. R

    Top Ten

    Thanks greatly...being one of the older guys I forgot that I had a vbcode patch that does the same thing. Am just getting that to run correctly, and will compare your one as well. One way or the other I think I've got it at last.
  11. R

    Top Ten

    With Multiple Tables & Criteria Still Can't Get this one After checking MS Knowledge refs, can't seem to get the SQL right. And have never quite understood the statement RIGHT JOIN. I've 50k names, want the Top 15 by salary (Fld Poscode228.To) in each Department (Fld Govdoug.Deptcode) Here's...
  12. R

    Calculated Unique Text Field based on Existing text

    yet, hang on, for 3 years I've had two other related tables which both have blank PKs, the first has successfully lived with RI, the 2nd refuses. Perhaps then, the first survives and the others die??
  13. R

    Calculated Unique Text Field based on Existing text

    Message sinking in.....sometimes its slow An additional thought.... Thanks especially Pat for: "...since primary keys are not allowed to be null" So that'll mean there can never be RI, but can the related table be a lookup only? Or does that mean any criterion relating to this field should stay...
  14. R

    Calculated Unique Text Field based on Existing text

    Perhaps not explained well enough, Pat. The string 64k is far too long as a PK, and that is why I seek to derive a shorter version which will be unique e.g. 1st 5k(Word1),if space then next 1stk, etc. Part 2: You write : Access treats zero-length strings differently from nulls. So how do I...
  15. R

    Calculated Unique Text Field based on Existing text

    Okay, returning to Access, can this be done in the table design? or Must it be a Query-Make Table, or Is it a job for a Module? I have a long text field (64chrs), some are blank, others one word, and problem samples are Association Association xyz xxxxxx Association xya yyyyy xxx abcde xxx cc...
  16. R

    combining data from fields into a single field

    Okay, you basically want to create a calculated text field: Here's the basic solution: Usually you will make a new table of data from the existing table in which case in the query design grid type display_name: [maiden_name]&" "&[last_name] Using this format, when maiden_name is blank you...
  17. R

    Using 'Like' more than once in a query

    My queries usually deal with 50,000 recs with no problem
  18. R

    Random selections

    Thanks greatly, I think this will do the job perfectly...
  19. R

    Using 'Like' more than once in a query

    Just 2 cents worth more. I use multiple queries a lot and find that using OR LIKE repeatedly on the one line yields correct result. Problem with the new line approach is that Access limited to eight lines on the Query Builder.
  20. R

    Random selections

    Thanks for suggestions, but neither right when MAIN table has NAME_ID (Autonr), POSCODE (Links to table POSITIONS and field to sort on SALARY_TO) and the office addresses are all in DEPTNAMES (linked by DEPTCODE) and in MAIN.DEPT_ID. Fields to display are: DEPTNAMES.DEPTNAME, DEPTNAMES.CITY...
Back
Top Bottom