Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Posts
    5

    Question Unanswered: help with swapping 2 fields

    Hi guys,
    I need your help with swapping 2 field, basicly I have a handheld scanner check in and out database with 2 tables symbol and department, someone from department A brings a damaged scanner I wanna be able to scan the serial number then the ID number is displayed(this is for the damaged one), on right side there going to be another serial number field which is supposed to be for the new one that I'm gonna give them, some how I want the old ID # that was tied to the damaged scanner to be tied to the new one and to be deleted from the damaged scanner, can anyone help mw with this database please.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Ummmm.....OK....You got me confooossed. I've read your post a few times but I just can put a handle on it. I'm not sure if it's to much information, or not quite enough.

    Do you mean: You have two tables (got that). You want to change the ID number in table1 to be placed into table2 and then the record (?) pertaining to the ID number in table1 deleted.

    Is this what you mean?

  3. #3
    Join Date
    Dec 2003
    Posts
    5
    Yes that is kinda what I mean, a form that has a field for serial number and a field for ID # and I want to enter the serial number and it displays the ID # tied to it ok. On the same form there going to be a field for another serial number that's going to be tied to the ID #, so when I hit submit, the ID # from the first serial number is going to be deleted from the first serial number and it's going to be assigned to the second serial number, you see?

    Thank you for responding

  4. #4
    Join Date
    Dec 2003
    Posts
    16
    Originally posted by Adnane
    Yes that is kinda what I mean, a form that has a field for serial number and a field for ID # and I want to enter the serial number and it displays the ID # tied to it ok. On the same form there going to be a field for another serial number that's going to be tied to the ID #, so when I hit submit, the ID # from the first serial number is going to be deleted from the first serial number and it's going to be assigned to the second serial number, you see?

    Thank you for responding
    I'm assuming that the ID# and Serial# have a unique relationship and are either in the same table or can be joined with a query.

    I would use a combobox bound to a query which contains both fields. Or a text box to enter the Serial# and use a recordsetclone find sub to retrieve the ID# into another unbound readonly control for reference.

    Then use an unbound text box to enter the new Serial#. Click a command button to run a sub which makes the change via recordsetclone, then requery your combobox if that's what you used.

  5. #5
    Join Date
    Dec 2003
    Posts
    5
    Thank you for your response, I am not quite sure how to do all of that. Is it possible to give the code for the combo box to display the id number on a different field and the code that's going to swap the id to another designated serial number.

  6. #6
    Join Date
    Dec 2003
    Posts
    5
    "I'm assuming that the ID# and Serial# have a unique relationship and are either in the same table or can be joined with a query.

    I would use a combobox bound to a query which contains both fields. Or a text box to enter the Serial# and use a recordsetclone find sub to retrieve the ID# into another unbound readonly control for reference.

    Then use an unbound text box to enter the new Serial#. Click a command button to run a sub which makes the change via recordsetclone, then requery your combobox if that's what you used."

    Can anyone please help me with this code? I really need it

Posting Permissions

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