Transfer data to another table

F

Fred's

Hi folks,

I have a field Yes/No and when the box is (checked) I want the data to
be transfer to another table
with the same value "Yes"

Dosen't anyone knows how can I do this?

Thanking you all in advance for your help!
Fred's
 
P

Pat Hartman

Yes, many of us know how to do this and most would recommend against it.
We'll need a little more information regarding what you actually are trying
to accomplish since leaving the data in the existing table allows you to
control what is selected by using criteria. Are you asking to delete from
table1 and append to table2 or leave the rows in table1 but make a copy in
table2. Will you be recreating table2 each time or are you adding rows to
an existing table? Both the adding and deleting processes will be done with
queries. If your process is a "move", you will need to run the query that
appends to table2 prior to running the query that deletes from table1.
There is no "move" action so the "move" must be handled by two separate
queries.
 
F

Fred's

Yes, many of us know how to do this and most would recommend against it.
We'll need a little more information regarding what you actually are trying
to accomplish since leaving the data in the existing table allows you to
control what is selected by using criteria.  Are you asking to delete from
table1 and append to table2 or leave the rows in table1 but make a copy in
table2.  Will you be recreating table2 each time or are you adding rows to
an existing table?  Both the adding and deleting processes will be done with
queries.  If your process is a "move", you will need to run the query that
appends to table2 prior to running the query that deletes from table1.
There is no "move" action so the "move" must be handled by two separate
queries.









- Show quoted text -

I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for Deliveries received and another one report for the
Non-received deliveries.
 
W

Wayne-I-M

Hi

You could run one report showing just Ticks and another report showing "not
ticks". Sorry don't know the right english for that but hope you understand.
You don't need to make a new table.

You could use a form with a toggle box like this

Private Sub FrameName_AfterUpdate()
Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select
End Sub

Of course change Report Name - Field Name - Frame Name.

There are lots of way to do what you want but creating a new table will just
make more work.
 
F

Fred's

Hi

You could run one report showing just Ticks and another report showing "not
ticks".  Sorry don't know the right english for that but hope you understand.
 You don't need to make a new table.

You could use a form with a toggle box like this

Private Sub FrameName_AfterUpdate()
    Select Case Me!FrameNameSelect
        Case 1
    DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
        Case 2
    DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
    End Select
End Sub

Of course change Report Name - Field Name - Frame Name.

There are lots of way to do what you want but creating a new table will just
make more work.

--
Wayne
Manchester, England.



I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for  Deliveries received and another one report for the
Non-received deliveries.- Hide quoted text -

- Show quoted text -

Hi Wayne,

The check box is on a continuous form. How can i use your vba code?
 
P

Pat Hartman

This is not code you would put in an event on the continuous form unless you
put the option group in the form's header section.

Hi

You could run one report showing just Ticks and another report showing
"not
ticks". Sorry don't know the right english for that but hope you
understand.
You don't need to make a new table.

You could use a form with a toggle box like this

Private Sub FrameName_AfterUpdate()
Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select
End Sub

Of course change Report Name - Field Name - Frame Name.

There are lots of way to do what you want but creating a new table will
just
make more work.

--
Wayne
Manchester, England.



I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for Deliveries received and another one report for the
Non-received deliveries.- Hide quoted text -

- Show quoted text -

Hi Wayne,

The check box is on a continuous form. How can i use your vba code?
 
W

Wayne-I-M

Hi

There are quite a few methods
Open the continous form and insert the unbound form in the form's header.

Or

In the header of the continous form simply put 2 buttons. Print the ticks.
Print the not ticks (would like to know the righting english for that - any
help??).
Put the 2 lines of code on the OnClick event.

Ect
ect
ect

There are lots of methods.

If you have problems with any of the codeing post back and someone will be
able to help

Happy New Year and good luck


--
Wayne
Manchester, England.



Fred's said:
Hi

You could run one report showing just Ticks and another report showing "not
ticks". Sorry don't know the right english for that but hope you understand.
You don't need to make a new table.

You could use a form with a toggle box like this

Private Sub FrameName_AfterUpdate()
Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select
End Sub

Of course change Report Name - Field Name - Frame Name.

There are lots of way to do what you want but creating a new table will just
make more work.

--
Wayne
Manchester, England.



Fred's said:
Yes, many of us know how to do this and most would recommend against it.
We'll need a little more information regarding what you actually are trying
to accomplish since leaving the data in the existing table allows you to
control what is selected by using criteria. Are you asking to delete from
table1 and append to table2 or leave the rows in table1 but make a copy in
table2. Will you be recreating table2 each time or are you adding rows to
an existing table? Both the adding and deleting processes will be done with
queries. If your process is a "move", you will need to run the query that
appends to table2 prior to running the query that deletes from table1.
There is no "move" action so the "move" must be handled by two separate
queries.
Hi folks,
I have a field Yes/No and when the box is (checked) I want the data to
be transfer to another table
with the same value "Yes"
Dosen't anyone knows how can I do this?
Thanking you all in advance for your help!
Fred's- Hide quoted text -
- Show quoted text -
I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for Deliveries received and another one report for the
Non-received deliveries.- Hide quoted text -

- Show quoted text -

Hi Wayne,

The check box is on a continuous form. How can i use your vba code?
 
W

Wayne-I-M

Srry

Unbound form should have said Toggle box

Ha Ha Ha New Year resolution - learn english to be better


--
Wayne
Manchester, England.



Wayne-I-M said:
Hi

There are quite a few methods
Open the continous form and insert the unbound form in the form's header.

Or

In the header of the continous form simply put 2 buttons. Print the ticks.
Print the not ticks (would like to know the righting english for that - any
help??).
Put the 2 lines of code on the OnClick event.

Ect
ect
ect

There are lots of methods.

If you have problems with any of the codeing post back and someone will be
able to help

Happy New Year and good luck


--
Wayne
Manchester, England.



Fred's said:
Hi

You could run one report showing just Ticks and another report showing "not
ticks". Sorry don't know the right english for that but hope you understand.
You don't need to make a new table.

You could use a form with a toggle box like this

Private Sub FrameName_AfterUpdate()
Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select
End Sub

Of course change Report Name - Field Name - Frame Name.

There are lots of way to do what you want but creating a new table will just
make more work.

--
Wayne
Manchester, England.



:
Yes, many of us know how to do this and most would recommend against it.
We'll need a little more information regarding what you actually are trying
to accomplish since leaving the data in the existing table allows you to
control what is selected by using criteria. Are you asking to delete from
table1 and append to table2 or leave the rows in table1 but make a copy in
table2. Will you be recreating table2 each time or are you adding rows to
an existing table? Both the adding and deleting processes will be done with
queries. If your process is a "move", you will need to run the query that
appends to table2 prior to running the query that deletes from table1.
There is no "move" action so the "move" must be handled by two separate
queries.



Hi folks,

I have a field Yes/No and when the box is (checked) I want the data to
be transfer to another table
with the same value "Yes"

Dosen't anyone knows how can I do this?

Thanking you all in advance for your help!
Fred's- Hide quoted text -

- Show quoted text -

I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for Deliveries received and another one report for the
Non-received deliveries.- Hide quoted text -

- Show quoted text -

Hi Wayne,

The check box is on a continuous form. How can i use your vba code?
 
F

Fred's

This is not code you would put in an event on the continuous form unless you
put the option group in the form's header section.


You could run one report showing just Ticks and another report showing
"not
ticks". Sorry don't know the right english for that but hope you
understand.
You don't need to make a new table.
You could use a form with a toggle box like this
Private Sub FrameName_AfterUpdate()
Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select
End Sub
Of course change Report Name - Field Name - Frame Name.
There are lots of way to do what you want but creating a new table will
just
make more work.
- Show quoted text -

Hi Wayne,

The check box is on a continuous form. How can i use your vba code?- Hide quoted text -

- Show quoted text -

What should I do, then?
 
F

Fred's

Srry

Unbound form should have said  Toggle box

Ha Ha Ha  New Year resolution - learn english to be better

--
Wayne
Manchester, England.



Wayne-I-M said:
There are quite a few methods
Open the continous form and insert the unbound form in the form's header..

In the header of the continous form simply put 2 buttons.  Print the ticks.  
Print the not ticks (would like to know the righting english for that - any
help??).
Put the 2 lines of code on the OnClick event.

There are lots of methods.
If you have problems with any of the codeing post back and someone will be
able to help
Happy New Year and good luck
On Jan 2, 3:21 pm, Wayne-I-M <[email protected]>
wrote:
Hi
You could run one report showing just Ticks and another report showing "not
ticks".  Sorry don't know the right english for that but hope you understand.
 You don't need to make a new table.
You could use a form with a toggle box like this
Private Sub FrameName_AfterUpdate()
    Select Case Me!FrameNameSelect
        Case 1
    DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
        Case 2
    DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
    End Select
End Sub
Of course change Report Name - Field Name - Frame Name.
There are lots of way to do what you want but creating a new table will just
make more work.
--
Wayne
Manchester, England.
:
Yes, many of us know how to do this and most would recommend against it.
We'll need a little more information regarding what you actuallyare trying
to accomplish since leaving the data in the existing table allows you to
control what is selected by using criteria.  Are you asking todelete from
table1 and append to table2 or leave the rows in table1 but makea copy in
table2.  Will you be recreating table2 each time or are you adding rows to
an existing table?  Both the adding and deleting processes will be done with
queries.  If your process is a "move", you will need to run the query that
appends to table2 prior to running the query that deletes from table1.
There is no "move" action so the "move" must be handled by two separate
queries.

Hi folks,
I have a field Yes/No and when the box is (checked) I want thedata to
be transfer to another table
with the same value "Yes"
Dosen't anyone knows how can I do this?
Thanking you all in advance for your help!
Fred's- Hide quoted text -
- Show quoted text -
I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for  Deliveries received and another one report forthe
Non-received deliveries.- Hide quoted text -
- Show quoted text -
Hi Wayne,
The check box is on a continuous form. How can i use your vba code?- Hide quoted text -

- Show quoted text -

Wayne,

do you have an example of which 2 lines of code should I put on the
OnClick event?
 
W

Wayne-I-M

Open the form in design view.

In the form's header section insert a option group group (it's on the tool
box).
Use the wizard
Add text to the lables to show what you want each to do
Select No to default

Right click the option box (still in design)
Open the propertes box
Select the event column
Select AfterUpdate
Select Code Build
Select the build option (...)

Insert this between the 2 line you see

Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select


Change the ReportName in the code to the name of your report. Change the
FieldName to the name of the field in the report that contain the tick box.
Change FrameName to the name of the frame (it's the 1st line of code that the
wizard added for you)

Save and give it a go.


Save






--
Wayne
Manchester, England.



Fred's said:
This is not code you would put in an event on the continuous form unless you
put the option group in the form's header section.


You could run one report showing just Ticks and another report showing
"not
ticks". Sorry don't know the right english for that but hope you
understand.
You don't need to make a new table.
You could use a form with a toggle box like this
Private Sub FrameName_AfterUpdate()
Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select
End Sub
Of course change Report Name - Field Name - Frame Name.
There are lots of way to do what you want but creating a new table will
just
make more work.
:
Yes, many of us know how to do this and most would recommend against
it.
We'll need a little more information regarding what you actually are
trying
to accomplish since leaving the data in the existing table allows you
to
control what is selected by using criteria. Are you asking to delete
from
table1 and append to table2 or leave the rows in table1 but make a
copy in
table2. Will you be recreating table2 each time or are you adding rows
to
an existing table? Both the adding and deleting processes will be done
with
queries. If your process is a "move", you will need to run the query
that
appends to table2 prior to running the query that deletes from table1.
There is no "move" action so the "move" must be handled by two
separate
queries.
Hi folks,
I have a field Yes/No and when the box is (checked) I want the data
to
be transfer to another table
with the same value "Yes"
Dosen't anyone knows how can I do this?
Thanking you all in advance for your help!
Fred's- Hide quoted text -
- Show quoted text -
I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for Deliveries received and another one report for the
Non-received deliveries.- Hide quoted text -
- Show quoted text -

Hi Wayne,

The check box is on a continuous form. How can i use your vba code?- Hide quoted text -

- Show quoted text -

What should I do, then?
 
F

Fred's

Open the form in design view.

In the form's header section insert a option group group (it's on the tool
box).
Use the wizard
Add text to the lables to show what you want each to do
Select No  to default

Right click the option box (still in design)
Open the propertes box
Select the event column
Select AfterUpdate
Select Code Build
Select the build option  (...)

Insert this between the 2 line you see

    Select Case Me!FrameNameSelect
        Case 1
    DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
        Case 2
    DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
    End Select

Change the ReportName in the code to the name of your report.  Change the
FieldName to the name of the field in the report that contain the tick box..  
Change FrameName to the name of the frame (it's the 1st line of code that the
wizard added for you)

Save and give it a go.

Save

--
Wayne
Manchester, England.



Fred's said:
This is not code you would put in an event on the continuous form unless you
put the option group in the form's header section.
On Jan 2, 3:21 pm, Wayne-I-M <[email protected]>
wrote:
Hi
You could run one report showing just Ticks and another report showing
"not
ticks". Sorry don't know the right english for that but hope you
understand.
You don't need to make a new table.
You could use a form with a toggle box like this
Private Sub FrameName_AfterUpdate()
Select Case Me!FrameNameSelect
Case 1
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=-1",
acNormal
Case 2
DoCmd.OpenReport "ReportName", acViewPreview, "", "[FieldName]=0",
acNormal
End Select
End Sub
Of course change Report Name - Field Name - Frame Name.
There are lots of way to do what you want but creating a new table will
just
make more work.
--
Wayne
Manchester, England.
:
Yes, many of us know how to do this and most would recommend against
it.
We'll need a little more information regarding what you actuallyare
trying
to accomplish since leaving the data in the existing table allows you
to
control what is selected by using criteria. Are you asking to delete
from
table1 and append to table2 or leave the rows in table1 but makea
copy in
table2. Will you be recreating table2 each time or are you adding rows
to
an existing table? Both the adding and deleting processes will be done
with
queries. If your process is a "move", you will need to run the query
that
appends to table2 prior to running the query that deletes from table1.
There is no "move" action so the "move" must be handled by two
separate
queries.

Hi folks,
I have a field Yes/No and when the box is (checked) I want thedata
to
be transfer to another table
with the same value "Yes"
Dosen't anyone knows how can I do this?
Thanking you all in advance for your help!
Fred's- Hide quoted text -
- Show quoted text -
I want to copy the information from a delivery into another table when
the delivery is received (with a check box Yes/No), so I can make
reports. One for Deliveries received and another one report for the
Non-received deliveries.- Hide quoted text -
- Show quoted text -
Hi Wayne,
The check box is on a continuous form. How can i use your vba code?- Hide quoted text -
- Show quoted text -
What should I do, then?- Hide quoted text -

- Show quoted text -

Hi Wayne,

I have a continuous form, so it is a way to add automaticly the CASES,
since I will have multiple lignes..on my form
instead of case1, case2, case3......
 
B

Beetle

The Select Case statement applies to the option group in the header (assuming
you added an option group as Wayne suggested), not to the records in your
form. If you have two choices in you option group, then you will hace two
cases for your statement. When you make a selection in an option group, it is
represented as a numerical value (1,2,3 etc.), so Case 1 tells Access what to
do if the first option in the group is selected, and so on.

_________

Sean Bailey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top