Wednesday, 6 July 2016

How to Fix Error - append to a table that has a new name every time it is run?

append to a table that has a new name every time it is run


I have set up a  "copy  blank table and rename" and I've been able to rename it a different table name everytime it is run, so I don't double up on the same table name.  I have been able to do this by running a macro and in the "New Name" section, I have entered
"=Forms!frmTransmittals!transTransmittalNumber" so each time I have a new transmittal number with the result set of records that I want to go under that same transmittal nubmer it will rename the table for the records that will about to be appended to this
new table with the transmittal number from the control in my form named "transTransmitttalNumber" from my form "frmTransmittals".  ok so now that I have accomplished this, I know how to append the record to a new table, but I am unsure of how to append these
records to the new table name every time my "copy blank table and rename" is run.
This is my SQL so far, which appends to records into the foreign key table based on the primary key table (the parent) to keep the link between the two.

INSERT INTO tblTransmittalRecords  ( trecTransmittalNumber, trectraDocNo, trectraRevNo, trectraOwner, trectraRevisionDate, trectraStatus, trectraSentReceived, trectraToFrom, trectraCompany, trectraTransmittalDate, trectraTransmittalNo, trectraNotes, trectraDateCreated,
trectraSelect, trecdocTitle, trecdocType, trecdocDocNo, trecdocNotes )
SELECT tblTransmittals.transTransmittalNumber, qryPreviewResultsOnCheckboxes.traDocNo, qryPreviewResultsOnCheckboxes.traRevNo, qryPreviewResultsOnCheckboxes.traOwner, qryPreviewResultsOnCheckboxes.traRevisionDate, qryPreviewResultsOnCheckboxes.traStatus, qryPreviewResultsOnCheckboxes.traSentReceived,
qryPreviewResultsOnCheckboxes.traToFrom, qryPreviewResultsOnCheckboxes.traCompany, qryPreviewResultsOnCheckboxes.traTransmittalDate, qryPreviewResultsOnCheckboxes.traTransmittalNo, qryPreviewResultsOnCheckboxes.traNotes, qryPreviewResultsOnCheckboxes.traDateCreated,
qryPreviewResultsOnCheckboxes.traSelect, qryPreviewResultsOnCheckboxes.docTitle, qryPreviewResultsOnCheckboxes.docType, qryPreviewResultsOnCheckboxes.docDocNo, qryPreviewResultsOnCheckboxes.docNotes
FROM tblTransmittals, qryPreviewResultsOnCheckboxes
WHERE ((tblTransmittals.transTransmittalNumber)=(Forms!frmTransmittals.transTransmittalNumber));

but now I want to append these records into the new table that I just 'copied and renamed" to the transmittal number.  so in the INSERT INTO I tried

=Forms!frmTransmittal!transTransmittalNumber  and it didn't work
I tried
Forms!frmTransmittal!transTransmittalNumber didn't work
I need to be able to name the new table name, but as this will change everytime it is run, I am not sure what to put in here to allow it look for the new table name.

hope this makes sense and then is there a way to automatically link this table to the parent table?  that will be the next hurdle.


Anwsers to the Problem append to a table that has a new name every time it is run

Download Error Fixer for Free Now

Of course; just base the report on a query including the transmittal number as a criterion.
Post (or repost, so I don't have to search back through old posts - sorry!) the structure and relationship of your tables.
I'm sure there's a way (perhaps, as I suggested, with the help of a resolver table) to do this with a query, rather than this mess
of creating new tables!

In this method we will try to Boot in Safe mode with Networking and see if the error still persists.

  • Search "MSCONFIG" and Open.
  • Click on Boot Tab
  • Tick Safe Boot in Boot Option
  • Select Network.
  • Click Apply and OK.
  • Reboot your System.

Another Safe way to Repair the Problem: append to a table that has a new name every time it is run:

How to Fix append to a table that has a new name every time it is run with SmartPCFixer?

1. Click the button to download SmartPCFixer . Install it on your system.  Open it, and it will perform a scan for your system. The junk files will be shown in the list.

2. After the scan is finished, you can see the errors and problems need to be repaired. Click Fix All.

3. The Fixing part is finished, the speed of your computer will be much higher than before and the errors have been fixed.

Related: error message fsui.exe/ wlidcli.dll is missing
,Solution to Error: Excel: Automatic number generation
,Troubleshoot:i wanna change language of all windows in Windows 7 Home Premium
,Troubleshooting:IF Function, if the vendor ID in column A matches any of the vendor ID's in column F, I want 1099 to appear in column D. Error
,Fast Solution to Problem: ReadyBoost is not working properly in my computer
,Troubleshoot:Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive. Error,External Hard Drive not listed in Windows 7 backup wizard Tech Support,Tech Support: I'm always being signed off so annoying,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.,Referencing data in Access using Excel [Anwsered],Need Best Way To Present Data [Anwsered],Same question but for windows 7 home edition,sometimes fullscreen won't activate [Solved],Solution to Error: We bought a new computer with windows 7 and it is constantly freezing. How do we fix this?,Solution to Error: Windows 8 update crash (2013-07-22),brclr.dll.mu_ Missing Error Fixer,How To Resolve Missing fin_myagtui.eng Problem,Corrupted f_0006ad File - How to Fix,nkebigvg.cpl Not Found Error Fixer,Corrupted olcontrols.ocx File - How to Fix
Read More: Fast Solution to Error: Annoying bar on right side + restored documents??,Troubleshoot:Angry Birds won't play (was: Programs Compatibility Application Applications App Apps Game Games Legacy Crash Crashes Hang Hangs),Am unable to open my emails in ms outlook 2007 Tech Support,How to Fix - all pages close?,[Solved] AMD Mobility Radeon HD 5470,After Windows Update CD/DVD drive does not work,After installing windows 7 to laptop the labels print out of line how can I fix it,After my computer sleeps the wireless always disconnects and will no reconnect,After signing into, I get a message" This tab has been recovered"....what does this mean and how do I fix it.....,All desktop icons changed to windows live and does not open

No comments:

Post a Comment