Textbox if filled in completes another record

Ryker

Registered User.
Local time
Today, 16:24
Joined
Jun 27, 2016
Messages
17
I have searched all over for a fix or an idea how to go about this, I am sorry in advanced if what I am trying to do and how I explain it sounds wonky.

Back Story

Database with multiple tables, which I feel I have multiple with redundancy. Example... I have a table for New Computers and one for Old Computers. I do feel I should just have 1 table, and a column that marks it old or new.

I have a technician form that we give to the tech's to take to the jobsite. on it has The new PC Number and the Old PC number. These are input by the scheduling person back at the office.

Is there a way to have a merged table of New Computers and old Computers into just Computers and have another column to annotate new or old.

Which brings my dilemma of the new pc textbox and old pc textbox.

Can I have a textbox that if filled in adds a new record to Computers with the PC Number that is entered, and autofills the new/old column based on the textbox that is filled in?

Also having another textbox with the same thing except it would make a new record labeled Old?


Sorry if this sounds confusing. Let me know if there is any other information I could provide to make helping me easier.
 
are the two table structure the same?
select a pk field on each table, this will make it easier.
if you want to keep the current setup, two tables, use an unbound form.
check pc number is entered in textbox check old pc table first, if found, change recordsource and use old pc table. display the record.
if not on old pc, check new pc table if exists, change recordsource to new pc table. display record. if not add new record.

others may have different approach. lets here from them.
 
are the two table structure the same?
select a pk field on each table, this will make it easier.
if you want to keep the current setup, two tables, use an unbound form.
check pc number is entered in textbox check old pc table first, if found, change recordsource and use old pc table. display the record.
if not on old pc, check new pc table if exists, change recordsource to new pc table. display record. if not add new record.

I have a table for New Computers and one for Old Computers.

Yes, the structure is the same except for labeled New/Old.

PCNumber is the PK

I prefer to have 1 Table vs. 2 separate Tables.
 
in that case merge the two tables.
backup both tables first.
after this create a query to insert all records from old pc table to new pc table.

Insert into [new pc] (field1Name, field2Name, fiel3Name,...) Select field1name, field2name, field3name,... from [old pc];

rename new pc table to desired name you want.
modify your form.
 
I wish it were that easy,

The issue:

I had set NewPCNumber the pk in the NewPCtable
I had set the OldPCNumber the pk in the OldPCtable

if I merge them I could make the SerialNumber the pk, however I am unable to due to us not know the Serial Number until we get the old computer from the user. And it would give us an issue without entering in the PK value.
 
then how did you enter the record into the old pc table, when you don't know the serial number (thereby making the pk field blank!)?
 
then how did you enter the record into the old pc table, when you don't know the serial number (thereby making the pk field blank!)?

I haven't merged the fields yet, since I do not have a solution to my problem.

I currently still have the two tables.

I had set NewPCNumber the pk in the NewPCtable
I had set the OldPCNumber the pk in the OldPCtable
 

Users who are viewing this thread

Back
Top Bottom