Consulting

Results 1 to 9 of 9

Thread: VBA update a table wirh a certificate from an unrelated table

  1. #1
    VBAX Regular
    Joined
    Jul 2017
    Posts
    18
    Location

    Question VBA update a table wirh a certificate from an unrelated table

    I have two tables:

    t_MCRs:
    MCRs_ID
    MCRs_DE_ID ( Short text ) this is the certificate field to update

    t_Certificates:
    Certificates_ ID
    MCRs_DE_ID short text, this is where i need to get tge certificate from. It is a pre-populated table of thousands of certificate numbers)
    Assigned? Boolean

    What would you reccomend as the best approach to apply these certificates to the MCR table ?

    Thank you for your advice !

    Bill

  2. #2
    VBAX Tutor
    Joined
    Mar 2014
    Posts
    210
    Location
    Is [Assigned] field needed?

    if
    t_MCRs.MCRs_DE_ID is filled in, then its assigned. This is determined by a query.


  3. #3
    VBAX Regular
    Joined
    Jul 2017
    Posts
    18
    Location
    I was thinking that I would need to update the status to assigned=yes, due to my inexperience on how to proceed.

    I just do not know how to assign a t_certificates!MCRs_DE_ID to the t_MCRs!MCRs_DE_ID field...as it is not related on anything really....qe are basically just stamping it in. I have actually been pasting them in in datasheet mode...not ideal.

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    The Text from the certificate table should NOT be transferred to the MCR table.
    The MCR table field should be Number type Long and store the CertificateID, which is presumably an Autonumber field.
    If the process of transferring the Certificate is as random as you suggest then I would suggest that you use next available certificate and use a Combo to select it or VBA code to add it to the table.

  5. #5
    VBAX Regular
    Joined
    Jul 2017
    Posts
    18
    Location
    Would you please be able to advise me how to do this with VBA. I do truly understand your reccomendations as that would be the proper way, HOWEVER, we must do it as a batch after the fact....I have been counting the records in t_MCRs, then copying that many certificate numbers and pasting them into the t_MCRs!MCRs_DE_ID field and noting the ones used in the certificates table. Can you please help me with the VBA to do this please???

    Thank you sincerely,

    Bill

  6. #6
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Do you still have my email address?

  7. #7
    VBAX Regular
    Joined
    Jul 2017
    Posts
    18
    Location
    Not where I am now.... could you please resend to me ?

  8. #8
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Are you still using your fseso email account?

  9. #9
    VBAX Regular
    Joined
    Jul 2017
    Posts
    18
    Location

    Yes

    Quote Originally Posted by OBP View Post
    Are you still using your fseso email account?
    Yes I am...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •