Move Records

May 6, 2005

is there a way by which i can move one or more records from one form to another when clicked on the 'YES/NO' button ??? :confused:

thanks in advance.

View Replies


ADVERTISEMENT

Move Records Between Tables

Nov 22, 2005

hiya, im new to this sql scene..!

i have an MS Access db containing a few tables of 'calls recorded' and 'finished calls'.

(i want to move all 'Finished calls' to a seperate 'Finished Calls' table)

anyway, the thing i want to do is to move records from Table1 to Table2, i am able to do this using the following code...

SELECT * INTO Table2
FROM Table1
WHERE Finished='Yes';

this code does work, however it does not delete the records that were moved out of Table1 - they are still there, its more or less copying and pasting them..

any help would be much appreciated!

View 14 Replies View Related

Move Records On ListBox

Mar 29, 2006

Here's a tough one that has been driving me crazy! (Probably easy, but I don't want to admit it!)

I have a form with a listbox called "lst_exclist". The recordsource for this listbox is the following query:

SELECT tbl_collexcludereasons.priority, tbl_collexcludereasons.excname, IIf(tbl_collexcludereasons.enabled=-1,'Enabled','Disabled') AS enabled, tbl_collexcludereasons.priority FROM tbl_collexcludereasons ORDER BY IIf(tbl_collexcludereasons.enabled=-1,'Enabled','Disabled') DESC , tbl_collexcludereasons.priority;

Which basically gives me this with dummy data:
2 PIPELINE ENABLED
3 HELLO ENABLED
5 GOODBYE ENABLED
1 BAD DISABLED
4 GOOD DISABLED
6 LAST DISABLED

I had two command buttons, one up arrow and one down arrow. The up arrow is supposed to move the selected record on the listbox up by exchanging the next lesser priority number with itself. The down arrow does the same. The DISABLED records are supposed to be ignored on the move up and move down procedures, meaning only ENABLED records are allowed to exchange priority numbers, and thus move up or down on the list. I tried the following code:

Me!lst_exclisthidden = Me!lst_exclist

DoCmd.SetWarnings False

Dim startingnumber As Integer
Dim endingnumber As Integer
Dim nametochange As String
Dim getchangerst As DAO.Recordset

If IsNull(Me!lst_exclist.Column(0)) = True Then
MsgBox "Please choose an entry on the above list to move.", vbCritical, "Error"
Exit Sub
Else
End If

If Me!lst_exclist.Column(2) = "Disabled" Then
MsgBox "There is no need to move a disabled selection, please enable the selection to change it's priority.", vbCritical, "Error"
Exit Sub
Else
End If

startingnumber = Me!lst_exclist.Column(0)
nametochange = Me!lst_exclist.Column(1)

endingnumber = startingnumber + 1

If Me!lst_exclisthidden = acLast Then
MsgBox "You cannot move the bottom selection on the list down, please choose another one.", vbCritical, "Error"
Exit Sub
Else
End If

While DCount("*", "tbl_collexcludereasons", "Priority = " & endingnumber & " and Enabled = -1") = 0
endingnumber = endingnumber + 1
Wend

DoCmd.RunSQL "Update tbl_collexcludereasons set tbl_collexcludereasons.priority = tbl_collexcludereasons.priority - 1 " & _
"Where tbl_collexcludereasons.priority <= " & endingnumber & " and tbl_collexcludereasons.priority > " & startingnumber

DoCmd.RunSQL "Update tbl_collexcludereasons set tbl_collexcludereasons.priority = " & endingnumber & " " & _
"Where tbl_collexcludereasons.excname = '" & nametochange & "'"

Me.Refresh

Me!lst_exclist = endingnumber

Me!lst_exclisthidden = Null

DoCmd.SetWarnings True

But it seems to loop when it gets the the area it is checking for numbers because the highest records is disabled, so it's ignored. How can I make this work? Please help!

Thanks

Vassago

View 1 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

Forms :: Move Records To New ID Or Delete?

Apr 26, 2014

I have an Equipment Form with a Supplier subform. The Supplier subform also has a subform, Equipment Pricing Records.

I have the ability to change the Supplier via a combo box, but Equipment Pricing Records become orphaned.

What I would like to do is when a Supplier is about to be changed, for the user to have the option to either a) delete the sub records, or b) the sub records to move across to the new Supplier.

I know I will need to use the after update event once the delete or move decision is made, but I can�t think how to identify the records and then either delete or move them to the new Supplier ID.

The EquipmentID will never change.

Fields are;

EQUIPMENT form;
EquipmentID

SUPPLIER form;
SupplierID
EquipmentIDFK

PRICING RECORD form;
PricingRecordID
SupplierIDFK
EquipmentIDFK

View 14 Replies View Related

Modules & VBA :: Move Between Records On A Form

Aug 11, 2014

i have a form, where a user inputs a account number inputting the account number, then populates all the relevant table fields, into the form for the user to edit.however if there is more than one account, with that account number, how do i get it so they can cycle through on the form?

View 2 Replies View Related

Using An APPEND Query To Move Records From One Table To Another...

Mar 10, 2008

I have an order system whereby there is a "basket" table and an order detail table.

I want to use an append query to move all the records from the basket table to the order detail table.

However, I also need to mark each record that gets appended to the order detail table with an "Order Id" that has already been saved in an Order table.

I.e. I save the main details of an order into the order table then copy records from the basket table into the order detail table along with an order ID that comes from a form.

The order ID is an autonumber.


Thank you all so much in advance =]

View 3 Replies View Related

Reports :: Move Or Hide Duplicate Records?

May 8, 2013

I'm having trouble with one of my reports. attached is a screencap of my report. The second name which is highlighted i need to either nudge it to the right so it is not directly under the first name OR remove it completely but keep the times and a gap for the next record.

I am creating is a sign in database where staff sign in/out for each day of a week. the issue is when the staff member signs in/out in the morning and then does the same when they get back from lunch it is difficult to read. This report is only printed once a week and will not show after a time frame of 5 days.

So, i still need that name to show up for the next day.

View 1 Replies View Related

Modules & VBA :: Move 10 Records At A Time Button

Nov 29, 2013

I'm using a form with next record and previous record buttons that works fine but as the size of the database has grown it's clear I need a faster way to move through records.

My solution was to have an advance 10 records at a time button but I'm having problems when reaching the far sides of the records.

For example: If I'm on record 9 and I press go back 10 button then access tries to go to record 0 (which doesn't exist) and brings up and error. The same happens if I try to advance more than total number of records.

I found a solution to this which was to disable the button when the recordcount was less than 10. This works except now if I'm on say record 14 and want to go back to 4, i press the button, i goes back to record 10, the button is disabled so it can't go back further and i get an error.

View 3 Replies View Related

Forms :: How To Move Records With Down Button In A Tabular Form

Jun 28, 2013

Is it possible to move down records with the down button in a tabular form to the same field in the next record.

View 11 Replies View Related

Weird - Font On Text Labels Gets Bolder As I Move Through Records

Oct 19, 2005

Hi all,
title says it all!

I've got a form with numerous controls and labels. When i first open the form, all looks fine - all labels are Black Arial 8 Bold. But when i start scrolling through the records, the text on three of my text labels gets bolder. I haven't a clue what is causing this - the labels are just standard - two are associated with controls and one is all on its own.

I have no code written to do this, and in fact i'm not sure you could write code to do this. I've tried renaming the labels, changing the font, deleting and recreating them, but it's always the same three that get darker.

Ideas?

P.

View 1 Replies View Related

Queries :: Drop Down List Selection - Move Records From One Table To Another?

Sep 15, 2013

Is there a way in which someone can select a table from a drop down list and then search that table for a record then move that record to another table.

For example.

User selects 'Mikey's_table' searchs for a record then move this selected record to 'Mandy's_table'

(all the tables have the same structure etc. identical apart from the name of the table and records within)

I have the list of tables that all the records will be on and the users will know which table the record is in, i basically need to know if there is an ability to search for a record over multiple tables then edit that record and move it to another Table.

I have tried to use a Union Query which works when searching but i cannot edit or move the record ...

View 1 Replies View Related

Move DB

Aug 21, 2007

I need to move my database from one computer to another and will need to put it on disk first. I have user serurity on the DB. Should it be ok as long as I put both files (the Db and the security) onto the disk and transfer them both?

Just asking as I cannot copy to CD from my computer and will have to put a request in so dont want to have to keep going back.

View 2 Replies View Related

OK - Move HELP!

Jan 10, 2006

hiya all! i need some help!

i want to make a button on my "Calls" database form, to move all "Finished" calls (calls that have been declared as completed), into a "Finished Calls" table.
I have half of it working - i have a button that DELETES all 'Finished' calls. However i now need them to COPY into my "Finished Calls" table... is it an Append Query i need?

the code i have now is as follows...

SELECT * INTO Table2
FROM Table1
WHERE Finished='Yes';

thanks in advance!
johnny

View 5 Replies View Related

Move Up And Down

Nov 16, 2006

Hello all

Got a question that I've never seen done in Access....
I have a DB I'm creating that creates pickup runs....(guy goes out and collects stuff) I'll need to get a subform showing the run items and be able to move them up or down according to the way in which the driver is going to do the run

Any ideas guys?
I've got no idea where to even start

View 4 Replies View Related

Move To SQL Server

Apr 20, 2007

I'm planning make a move from Access to SQL Server.
To be honest I never used it before, but I told to my bosses that I'm a Gooroo in it.:)
So can you guys give me an idea if it is really hard to make a move, to upload the existing databases and to get used to it.
How long it takes?
What books would you recommend?
Or what forum?

View 10 Replies View Related

Move From One List To Another

Dec 11, 2006

Hi all

Currently i have this setup

Listbox1
Rowsource: SELECT PREC FROM PNum;

I have created a Listbox2

What id like to do is move the selected items from Listbox1 one to Listbox2

Is there any simple way to do this? I'v looked around and found some examples, but they seemed too complicated for a newbie like me.

Thanks in advance!

View 2 Replies View Related

Move Value Problem

Apr 5, 2005

I have a form that has two fields. now when i click a button i wnat to bring those two values to another form, so less typing for the user. Now i did this before with the close event with a populate function?

I have two forms one: CFR second: New
CFR Fields: cfr_ehpid, cfr_ offsett

i want to bring those two feild values to the from new in feild5 and field 6
so when the user clicks the button it will open the form new and take the values from cfr and place them in feild5 and field 6??




Heres my code:


Private Sub Command359_Click()
Dim strblank As String
Dim strdesc As String
CFR_EHPID.SetFocus
strblank = CFR_EHPID.text
CFR_PATOFFSET.SetFocus
strdesc = CFR_PATOFFSET.text


strdesc = strdesc
Form_History.Text5 = Me.CFR_EHPID
Form_History.Text169 = Me.CFR_PATOFFSET
DoCmd.OpenForm "History"
Exit Sub
End Sub

View 1 Replies View Related

Please Help! - Move AfterUpdate

Aug 19, 2004

I know what I want to do...but have no idea how to get started! I'm new to coding and using macros and quesries doesn't seem to help.

When field [TermDate] is updated with a value, I want to move the record from table [BadgeData] to table [Termed]. I'm sure this is easy for someone who'll be willing to throw out a few suggestions.

Also, is there anywhere in the code builder that will help identify what code (or commands) do? (Does that make sense?)

View 5 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

Move Queries From Mdb To SQL Server

Apr 21, 2007

Hi,

I know how to move the tables from mdb to SQL Server.
But, how can I move all the queries from mdb file to SQL Server?

View 2 Replies View Related

Can't Move The Focus To The Control

Nov 7, 2007

Hi

I am trying to write simple code that undoes entering a new record and moves the focus to a mandatory field. I wrote the code below; however, I get this run time error message each time I run it.

DB can't move the focus to the control PlotNum.

My code:
Private Sub cmbHouseType_BeforeUpdate(Cancel As Integer)
Forms![frmHouse]![qryHouse2]![PlotNum].SetFocus
If Forms![frmHouse]![qryHouse2]![PlotNum].Text = "" Then
Cancel = True
Me.Undo
MsgBox "Please enter the Plot Number first, then enter the House Type"
End If
End Sub

Any help will be very much appreciated
B

View 4 Replies View Related

Move Crosstab Total To End

Nov 3, 2005

I created a crosstab query that I'm using to dynamically create a form. I know how to create a total in a crosstab query but it creates it before it creates the columns. I need the total column to show at the end of the columns. Does anyone know how to do this?

View 5 Replies View Related

Move Data From One Column To Another

Feb 13, 2006

OK, I have a truck mileage database with a columns for monthly "StartingMiles" and "EndingMiles" - At the beginning of each month I want to automatically move the entire content of the "EndingMiles" column to the "StartingMiles" so I can start a new reporting month. I'm assuming I can use an Update Query to do this - correct? How do I setup the Update query to perform this?
Or is there a better way?

View 1 Replies View Related

Move Form To Top Window

May 25, 2005

I have a pop up form that appears (with a beep) when a condition occurs. I would like that form to appear on top of all other window applications.

Access is an active application but the pop up form is hidden if other applications are in use.

Is there a way to have the pop up window appear on top?

Any help would be appreciated.

View 6 Replies View Related

ON Mouse Move Event

Feb 27, 2006

I have a switchboard using 4 different label that open a specific form when clicked. I have been trying to add a very simple code on the "on mouse move" event of each label that change the state of the 4 labels I am using:

Private Sub Form_Current()
Me.Option1.FontBold = True
Me.Option2.FontBold = False
Me.Option3.FontBold = False
Me.Option4.FontBold = False
Me.Arrow1.Visible = True
Me.Arrow2.Visible = False
Me.Arrow3.Visible = False
Me.Arrow4.Visible = False
End Sub

The code is working fine but all the label keeps flashing when I move the mouse over the labels which is a bit annoying. I don't see How I could get the "flashing" to stop. Would it be possible to cancel the "on move mouse event" once the code has been run once?

View 3 Replies View Related







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