Move To A Different Table Based On Criteria

Apr 28, 2005

I've got a database that pulls from a table. One of the options on the table is pending or complete. Right now, there are over 1000 records because they are all stored in the same record. I'd like to move the completed items to a different table.

Can this be done? If so, what steps do I need to take to do this?

Thanks!

View Replies


ADVERTISEMENT

Queries :: Update In Table From Same Table Based On Criteria Column In Same Table

Sep 29, 2013

How can I update (some columns) in a table from the same table based on a Criteria column in the same table.

View 2 Replies View Related

Insert Records Into Table Based On The Select Criteria From The First Table.

Mar 22, 2005

Hi

I have a small database with 4 tables that I am using for the current problem.
The tables are call, parents, mailman, orders.
Call and parents are related by the call ID (a primary key in the Call table.).
Mailman and orders are related by a Unique Id (a primary key in the mailman table.).

Forms involved are frmmain and frmsub.

Frmmain contains the call table information in the main form and parents information in the subform.

When a user enters a call with call ID and enters the operator name and parents information in the sub form,
When a user clicks the OK button on the main form, necessary changes should take place
if they enter the case type in the sub form part of parent information as ‘missing information’ or ‘missing link’ then the parent information with fields first name, lastname, case type, operator information should be inserted into mailman table in appropriate fields.

Simultaneously a record should be inserted into orders( after the record is first inserted into mailman, since both tables are linked with unique id) with the following information.
Orderid being autonumber.
Uniqueid from the mailman table.
Orderdate system date.
Ordertype should be “Mailman”

View 4 Replies View Related

Change Value In A Table Based On Criteria From A Different Table?

Sep 22, 2015

In my database I have 2 tables that contains values I would like to add if a check box is marked.

Table 1 columns: JobID;JobNumber; Product; Qty.

Table 2 columns: COrderID, JobNumber, QtyChanged, Accepted(Accepted has the check box).Also, there are multiple records for each job number based on how many change orders will be.

I would like to change the value of Qty on Table1 with the values of QtyChanged from Table2 only if the checkbox is marked.

View 6 Replies View Related

Queries :: Criteria Based On Combobox From Another Table

Nov 25, 2014

How to get my query to run from criteria based on a combobox from another table. I have a field "prac" that has entries such as JF, MG, PM, RJ etc.

My query has the criteria for prac as [Forms]![PracReportPrint]![PracChoice].

PracChoice is the name of the combobox.

If I specify a valuelist for the combobox the query works. I created a different table just for a list of practitioners that contains only an index key and practitioners (JF, MG, PM, RJ, and so forth). When I set the combobox to table/query and select practitioners from my other table I get the correct list,b ut the query doesn't seem to detect what is selected from the combobox.

View 2 Replies View Related

Trouble Extracting Field From Table Based On 2 Criteria

Jun 30, 2005

Hi all,
Been pulling my hair out about this for a while, so i hope someone's feeling kind:


http://www.agga.dsl.pipex.com/pics/AWF01.gif

I'm using the BHRefPrefix to build part of a reference number. The Principal and Site exist on a separate form, and i need to use both as criteria in order for the correct BHRefPrefix to be returned.

I sort of get it working using two joins, but it doesn't let me add any new records. I've tried straight queries, queries with DLookup expressions, and i just can't get what i need.

Pete

View 3 Replies View Related

Queries :: Delete Records Based On Criteria In Another Table

Jun 3, 2013

I am trying to create a delete query that, for a given person, deletes records in Table B that do not have a corresponding record in Table A.

Here are the relevant tables:

tblStates holds StateID, StateName, and RegionID (RegionID is a FK to tblRegions).
tblPeopleStates is a junction table between tblPeople and tblStates.

It lists states assigned to people. It has 3 fields: PersonStateID, PersonID, StateID.

tblPeopleRegions is a junction table between tblPeople and tblRegions.

It lists regions assigned to people. It has 3 fields: PersonRegionID, PersonID, RegionID.

For a given PersonID, I need to delete records (i.e., states) in tblPeopleStates whose RegionID is *not* in tblPeopleRegions.

For example, pretend that tblStates shows that State IDs 1, 5, and 6 are all in Region ID (i.e., all have a RegionID = 10).

If Joe (PersonID = 200) has StateIDs 1, 5, and 6 in tblPeopleStates, but doesn't have a record for RegionID = 10 in tblPeopleRegions, I need to delete his three records in tblPeopleStates (i.e., the ones where StateID = 1, 5, and 6).

PersonID will be found on [Forms]![frmMain]![subform1].[Form]![subform2].Form]![PersonID]

View 8 Replies View Related

How To Construct Dynamically A Table Field Based On Query Criteria.

Sep 13, 2007

Hello all,

I have a temporary table with Yes/No fields (F101,F102,F103,....etc).
In another table i have a field called ProductCode with values (101,102,103,....etc)
Is it possible to append(or update) the records of the temp table with criteria on "F" &ProductCode field? (For example if ProductCode=101 then F101 sets to yes)

Thank you in advance.

View 4 Replies View Related

General :: WHERE Statement - List Box To Be Populated Based On Three Different Criteria In Table

Sep 14, 2013

I have an AfterUpdate event where I want a list box to be populated based on three different criteria based on a table in my database

1. Complete = False AND
2. Supplier on form = supplier in table AND
3. Status in table = "SUPPLIER_RFQ FOLLOW-UP" OR "SUPPLIER_RE-RFQ TO OTHER SUPPLIER"

I am having trouble with the last OR statement criteria, i cannot get this to return values correctly. Here is my code:

Me.cboSupplier.RowSource = "SELECT DISTINCT [Consolidated_Master_Req_Pool].[RFQ Contact] " & _
"FROM Consolidated_Master_Req_Pool " & _
"WHERE consolidated_master_req_pool.Complete = FALSE AND [Consolidated_Master_Req_Pool].[RFQ Supplier] = '" & Nz(Me.cboStatusRFQ) & "' And [consolidated_master_req_pool.Status] = '" & "SUPPLIER_RFQ FOLLOW-UP" & "' OR [consolidated_master_req_pool.Status] = '" & "SUPPLIER_RE-RFQ OTHER SUPPLIER" & "'" & _
"ORDER BY [Consolidated_Master_Req_Pool].[RFQ Contact];"

View 2 Replies View Related

Access Query To Filter Out List Based On Multiple Row Criteria From Another Table

May 10, 2014

I have an access database in which I have a table A and table B. Table A has a list of 200 website URLs. Table B has one column ID and another criteria.

I want to create a query to filter websites list which does not have values or characters from table b.

I have these values in table B that I want to be filtered out or not shown in my URL Select Query

.org
.gov
.du
.pk
.dk

I would keep on adding more criteria into this so criteria table so adding new criteria into table B should not disturb our filtering.

Below is what I have tried but in vain and it says atmost you can atmost one criteria row in sub query

SELECT tableA.WEB_ADDRESS
FROM tableA
WHERE ((([tableA].[wEB_ADDRESS] Not Like '*'+(SELECT * FROM tableB)+'*')=True));

View 9 Replies View Related

General :: Access Query To Filter Out List Based On Multiple Row Criteria From Another Table

May 10, 2014

I have an access database in which I have a table A and table B. Table A has a list of 200 website URLs. Table B has one column ID and another criteria.

I want to create a query to filter websites list which does not have values or characters from table b.

I have these values in table B that I want to be filtered out or not shown in my URL Select Query

.org
.gov
.du
.pk
.dk

I would keep on adding more criteria into this so criteria table so adding new criteria into table B should not disturb our filtering.

SELECT tableA.WEB_ADDRESS
FROM tableA
WHERE ((([tableA].[wEB_ADDRESS] Not Like '*'+(SELECT * FROM tableB)+'*')=True));

View 3 Replies View Related

Queries :: Query To Run Before Report Based On Criteria Based From Two Combo Boxes On Form

Mar 20, 2013

I have a report that gets its data from a query. I need the query to run before the report based on criteria based from two combo boxes on a form.

View 3 Replies View Related

Move Record To New Table After Data Change In Combo Box Value In Original Table.

Nov 24, 2006

Ok my problem is this......

I have a form with a field "Property Status" on it. It has 4 possible values -

"C - SHELTERED (with warden charge)";"H - SHELTERED (No warden charge)";"J - WHEELCHAIR SHELTERED (With warden charge)";"M - WHEELCHAIR SHELTERED (No warden charge)";"X - DISCONNECTED"

When the value "X - DISCONNECTED" is selected in the form I want the record to be removed from its existing table and sent to a new table which keeps all the "X - DISCONNECTED" records together.

Any ideas would be greatly appreciated. How would this be coded?

View 1 Replies View Related

Tables :: Autopopulation Of Field From Another Table Based On Another Field Criteria

Dec 5, 2012

I have a main table which is autonumbered on unitid, I have another table which is linked via the unitid which holds items purchased for the main table, so the second table is a subform of the suppliers and will have multiple entries of the same unitid. What I would like to do is when an item is entered into the second table, check the main table to see if it exists, if it does populate the unitid field with the unitid from the main table, and if not exist create a new record in the main table with the next unitid number.

This in essence is what I want, bearing in mind that the tblinvoices is a subform and the tblmain is not open.

If ([tblinvoices]![Unit] = [tblmain]![Unit]) Then
[tblinvoices]![UnitID] = [tblinvoices]![UnitID]
End If

View 3 Replies View Related

Need To Move Data From Table A To Table B And Delete It

Sep 20, 2006

Well I have two tables, one is the workorder register and the other is the closed work orders. This is for maintenance. I have a form for creating and veiwing workorders. I need to link a command button to the form that will delete the record being viewed in the WO REG table and paste it in the Closed WO table. I think I need to use two append queries but have no idea what I am doing. Here is what I have so far.

INSERT INTO [CLOSED WO] ( WO, MMCN, TECH, NOMIN, FUALTS, TYPE, [SECTION], CLOSEDATE, OPENDATE )
SELECT [WO REG].[WO], [WO REG].[MMCN], [WO REG].[TECH], [WO REG].[NOMIN], [WO REG].[FUALTS], [WO REG].[TYPE], [WO REG].[SECTION], [WO REG].[CLOSEDATE], [WO REG].[OPENDATE]
FROM [CLOSED WO], [EQUIP REG] INNER JOIN [WO REG] ON [EQUIP REG].[MMCN]=[WO REG].[MMCN]
WHERE ((([WO REG].[WO])=[WHAT WO TO CLOSE?]));


Like I said I have no idea what I am doing, this is out of the SQL view for my "move to closed WO" query. the fields I need to move are WO, MMCN, TECH, NOMIN, FUALTS, TYPE, SECTION, CLOSEDATE, and OPENDATE.

Is this even remotly right? I know nothing of VBA an all these symbols mean nothing to me.

View 4 Replies View Related

Move A Record To Another Table

Sep 8, 2006

ok ive read some responses to people having trouble or need to know how to move a record from one table to another...
i have two tables. One with member and another with thier siblings.
i have two forms. one with the member details which contain a command box to open the other form for their siblings. the siblings form is a tabular form so when i double clikc the siblings form i can all the children but when i open it from a specific member only their children are shown.
each member has a memberID (primary key). but the siblings have the same ID as their father(member)

i have put a commmand box in the siblings form next to every sibling. what i want is that when i click this button the record moves to the members column.

i only know the very basics of VB...so a step by step explination would be helpful...

this is very specific and if more information is required please ask here or ask for my msn address.

Thank you in advance

View 4 Replies View Related

How To Automatically Move One Record From One Table To Another

Mar 26, 2008

Say i have two tables
1 = computers (it holds info about the computers)
2 = Repair (this table holds only the PCs that are under repair)

I want to be able to move one computer record to Repairs table as soon as i select that "this pc is under repair" on a form. So it does not show up on my report of computers in hand and shows up on computers in repair.

and when i get the pc back from repair, i want to be able to select "back in stock" and it'll move the record back to Computers tables & removes tht record from repairs table

is there a way i can do this automatically (without manually move a record)?

Any suggestions - web links or examples will be much appreciated.

Thank you

View 2 Replies View Related

(query) Move Old Members To Another Table

Aug 25, 2005

Hi all,

My database is a simple membership database that adds members and by clicking of a button it tells me the memebers birthdays for the month and if i chose to select the send card option then it remembers who has been send the card.

All i want now is a query that will take a member who's memebrship has been expired (since membership is year long only) and move them to another table by looking at the membership dates (like 2004 and 2003).

And may be later on if those members wants to join the membership i can then add them again from that table back to the main table.


I hope i made my self clear enough.

Thanks alot

View 4 Replies View Related

Move Data To Different Table Using Query

Sep 26, 2006

Ok here is what I've got.
I have a table called (EQUIP REG)
It contains all the information to the equipment in the hospitol.
next i have a table called (WO REG)
It contains all the information for the workorders for the equipment.

In the EQUIP REG table I have field titled (PM) this is the date that the equipment is due for PM's. Now I could just run a query for all the equipment on a given date called "MONTHLYPM" and then "open" the workorders by hand....but would be an all day job becuase there are nearly a thousand PM's a month. What i need is a wuery to run off of the above mention query that will copy the some data from the EQUIP REG table to the WO REG table. I only need the fields called "MMCN" "SERIAL" "MODEL" and "LOCATION"

I know very little about access and even less about VBA, so who ever is brave enough to help me must be able to talk on a very low level.
thanks for any help in advance. :)

View 2 Replies View Related

Using A Form To Move Records From One Table To Another.

Jun 27, 2005

Hello. I have a question that seems simple but I can't get it to work. Any help would be appresiated.

I need a form that will pull the oldest record from one table, allow the user to add a few fields to the record, then paste the record to a different table. when it is done the original record has to be removed from the original table.

I have tried using a append Query, but it moves all of the records at once and doesn't allow data entry on each record. I'm not sure if this would be done by a Query, Form or Macro. I have laid out the nessacary data flow below incase there is an easier way to do this.

Persons A,B, and C enters data into table 1.
later person D pulls the oldest record from table 1, reads the data then adds fields to the record and records it to table 2. The information is then removed from table 1. Person D then goes onto the next record from table 1. When person D is done, there will be no data left in table 1.

Any Ideas? or can someone point me in the right direction for help?

View 3 Replies View Related

Move MS Access Table Data

Aug 26, 2004

I am working on a calibration database which keeps track of measurement equipment and their scheduled calibration date. There are several gages that become "In-Active" because they are old, lost, or whatever. I have two tables that have Active and In-Active gage listings containing all of the pertinent information regarding that gage. I would like to put a button in the Active gage form which in the event the gage becomes "In-Active", pressing the button moves all of the information in the "Active" page to a new page in the "In-Active" table. So essentially one can look at Active gages and In-Active gages depending on the switchboard button that is clicked.

I know that is probably a crazy question but any thoughts or insight would be greatly appreciated.

View 1 Replies View Related

Move Data From One Field To Another Within A Table.

Nov 21, 2006

Hello. My question is how do I go about moving data from one field to another within a table? I want to move the data in ReportDateClo to ReportDatCom when both ReportDateClo and SupAct are true by record which are identified by the field LogNum. It is probably very simple but I am having a brain cramp.

ReportDateClo and ReportDatCom are "short date" date fields. SupAct is a Yes/No field. LogNum is an autonumber.

View 2 Replies View Related

General :: Move Table To Front End?

Apr 7, 2015

I'm trying to move a couple tables into the Front End of an Access 2010 database because the drop downs take awhile to load. We have horrible servers at work.

I can get some of them to convert to local table but naturally the ones I really need won't. The only table I want to remain in my backend is "project log data final". I don't even get an error message it just doesn't do it. Why would it not let me convert some to a local table. Does it have anything to do with relationships?

View 5 Replies View Related

Modules & VBA :: How To Move Data From A Table To Another

Mar 30, 2015

My boss has assigned a task for me to move the details under a field name (eg:[Name]) in table 1 to table2 under another field name (eg [Insured Name]).

Previously, the software I planned to use is Excel, but my boss says Excel cannot handle large data as the computer will be hanging.So,he wants me to use Access to do the programming.I have some programming backgrounds (like C++) but it seems like I hardly understand how Access works! So can any Access expert here teach me how to do so that i won't get fired.

Firstly, We will have the data like this.

Table1

Code:
Name | PolicyNo | Age | Benefit
--------+----------------+----------+-----------
Chris | 123 | 21 | Death
Jane | 456 | 34 | TPD
Adam | 789 | 55 | DD

Secondly, we let the other staffs to key in which column to be mapped with the other. Manually Key in (both columns).Mapping Table:

Code:
Table1 | Table2
--------------+-------------------
Name | InsuredName
Policy No | Pol_No
Benefit | InsuredBenefit
Age | InsuredAge

Thirdly, the staff will run the VBA and result would be like this.

Table2

Code:
InsureName | Pol_No | InsuredBenefit | InsuredAge
--------------+--------------+----------------------+----------------
Chris | 123 | Death | 21
Jane | 456 | TPD | 34
Adam | 789 | DD | 55

As you can see the new table(table2) , field number 3 is the same with the field number 4 in table1. There is something like copy and paste job, but user can decide how the arrangement for the new table is.

View 14 Replies View Related

Forms :: AfterUpdate Move Value To A Table

Jul 12, 2013

I have a form with a combox control that is bound to a table. It is a status field. When the status changes, I would like to take the OldValue of both the status combobox and the status date and move them to a table that when accessed will show a history of the prior status and corresponding dates.

View 14 Replies View Related

Move A Record From One Table To Another Upon Event

Jul 8, 2014

I have 2 tables, a and b.

Then I have records in each table with fields ,Name and Status(Done and Done_s)

I want records having "Done_s" to be moved to b whenever the change has occurred. Is this possible?(I have tried somethings with Macros but didn't work)...

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved