BlackOut????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henrootje

    #1

    BlackOut????

    I have two tables

    tblROVW
    tblROMR

    Both contain 2 identical fields; NUMBER CODE
    in tblROMR both fields are filled, in tblROVW only the field NUMBER is
    filled.

    for example

    tblROMR tblROVW

    Number Code Number Code
    1234567 311 1234567 {nothing}
    1897546 547 1897546 {nothing}

    Now how can I 'copy' the value of the field CODE from tblROMR to
    tblROVW where Number should be equal?

    I have been thinking about this for days, I know the solution is so
    simple but it simply will not come to me :(

    (I want the value actually entered in the tblROVW, that means not using
    a select query)

    TIA!

  • Henrootje

    #2
    Re: BlackOut????

    Never mind!

    I had a momentary bright moment!!

    UPDATE tblQROMR INNER JOIN tblQROVW1 ON tblQROMR.ROMR_N UIMBER=
    tblQROVW1.NUMBE RSET tblQROVW1.ROVW_ CODE= [tblQROMR1]![CODE];

    That did the trick!

    Comment

    • DFS

      #3
      Re: BlackOut????

      Henrootje wrote:[color=blue]
      > I have two tables
      >
      > tblROVW
      > tblROMR
      >
      > Both contain 2 identical fields; NUMBER CODE
      > in tblROMR both fields are filled, in tblROVW only the field NUMBER is
      > filled.
      >
      > for example
      >
      > tblROMR tblROVW
      >
      > Number Code Number Code
      > 1234567 311 1234567 {nothing}
      > 1897546 547 1897546 {nothing}
      >
      > Now how can I 'copy' the value of the field CODE from tblROMR to
      > tblROVW where Number should be equal?
      >
      > I have been thinking about this for days, I know the solution is so
      > simple but it simply will not come to me :([/color]

      Henrootje,

      Some honest advice: if you really found yourself thinking about this issue
      for days, you need to read up on SQL and relational databases, or ask for
      help earlier.

      Hints: don't name the field Number. That's an Access datatype (and a VBA
      property) that may cause you problems. How about ID? And rather than Code,
      you may want description_cod e.

      So, maybe StatusID and StatusCode, or UserNbr and UserCd. Depends on what's
      in the table.






      [color=blue]
      > (I want the value actually entered in the tblROVW, that means not
      > using a select query)
      >
      > TIA![/color]


      Comment

      • Henrootje

        #4
        Re: BlackOut????

        Thanks for your advice DFS.
        But I think this was typically a case of 'black-out' because in a flash
        it came to me. It is as a name that is on the tip of your tongue......
        You do know it but simply can not get iot to front :p

        And 'Number' and 'Code' are not the actual fieldnames. But, since they
        are dutch names here, I thought it would be easier to translate them
        for people here.
        The namingconventio n as we use here for fieldnames is always
        tabelname_field name
        So the actual fields are ROMR_BankrekNr and ROMR_GeldRek (ROVW_ for the
        other tbl.
        All tablenames start with 'tbl', 'qry' for query etc

        Comment

        • Henrootje

          #5
          Re: BlackOut????

          Thanks for your advice DFS.
          But I think this was typically a case of 'black-out' because in a flash
          it came to me. It is as a name that is on the tip of your tongue......
          You do know it but simply can not get iot to front :p

          And 'Number' and 'Code' are not the actual fieldnames. But, since they
          are dutch names here, I thought it would be easier to translate them
          for people here.
          The namingconventio n as we use here for fieldnames is always
          tabelname_field name
          So the actual fields are ROMR_BankrekNr and ROMR_GeldRek (ROVW_ for the
          other tbl.
          All tablenames start with 'tbl', 'qry' for query etc

          Comment

          Working...