A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to add additional info without losing info



 
 
Thread Tools Display Modes
  #1  
Old March 16th, 2010, 02:51 PM posted to microsoft.public.access
ann
external usenet poster
 
Posts: 462
Default How to add additional info without losing info

Hello -

I have a form that contains billing information such as Billing Reason,
Billing Date, Amount Paid and Amount Due.

What I would like to do is be able to click a button and have the fields
that are already populated, "clear" out and allow for additional information
to be entered, HOWEVER, I don't want to lose the information that was
"cleared" out to allow for the new information as I will want to query for
Billing Dates and the information associated with that date.

I hope I explained this enough to make sense.

If you have any ideas on how to make this happen, I would greatly appreciate
it.

Thanks in advance for your help!

  #2  
Old March 16th, 2010, 06:13 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How to add additional info without losing info

On Tue, 16 Mar 2010 07:51:01 -0700, Ann wrote:

Hello -

I have a form that contains billing information such as Billing Reason,
Billing Date, Amount Paid and Amount Due.

What I would like to do is be able to click a button and have the fields
that are already populated, "clear" out and allow for additional information
to be entered, HOWEVER, I don't want to lose the information that was
"cleared" out to allow for the new information as I will want to query for
Billing Dates and the information associated with that date.

I hope I explained this enough to make sense.

If you have any ideas on how to make this happen, I would greatly appreciate
it.

Thanks in advance for your help!


First off...

Your form does NOT contain the billing information, any more than my office
window "contains" the Owyhee Mountain range. That information is stored in a
table, and only in a table; the form is just a window.

What I think you want is to have the form simply move to a new, blank, empty
record in your billing table... but I'm not sure how your tables are
structured. What's the form's Recordsource? Where (in your tables) are these
fields stored? How are your tables related?
--

John W. Vinson [MVP]
  #3  
Old March 17th, 2010, 03:04 PM posted to microsoft.public.access
ann
external usenet poster
 
Posts: 462
Default How to add additional info without losing info

Hi John -

Thanks for responding.

Being a beginner, I did a stupid thing to save time, which I'm sure will
ending up costing me much more time in the long run, but I put my billing
information in the same table as my Customer information. I know that's a
big no-no, but I was pressed for time.

Is there still a way to do this, or should I start over and split the tables?

Thanks.

"John W. Vinson" wrote:

On Tue, 16 Mar 2010 07:51:01 -0700, Ann wrote:

Hello -

I have a form that contains billing information such as Billing Reason,
Billing Date, Amount Paid and Amount Due.

What I would like to do is be able to click a button and have the fields
that are already populated, "clear" out and allow for additional information
to be entered, HOWEVER, I don't want to lose the information that was
"cleared" out to allow for the new information as I will want to query for
Billing Dates and the information associated with that date.

I hope I explained this enough to make sense.

If you have any ideas on how to make this happen, I would greatly appreciate
it.

Thanks in advance for your help!


First off...

Your form does NOT contain the billing information, any more than my office
window "contains" the Owyhee Mountain range. That information is stored in a
table, and only in a table; the form is just a window.

What I think you want is to have the form simply move to a new, blank, empty
record in your billing table... but I'm not sure how your tables are
structured. What's the form's Recordsource? Where (in your tables) are these
fields stored? How are your tables related?
--

John W. Vinson [MVP]
.

  #4  
Old March 17th, 2010, 04:09 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How to add additional info without losing info

On Wed, 17 Mar 2010 08:04:02 -0700, Ann wrote:

Hi John -

Thanks for responding.

Being a beginner, I did a stupid thing to save time, which I'm sure will
ending up costing me much more time in the long run, but I put my billing
information in the same table as my Customer information. I know that's a
big no-no, but I was pressed for time.

Is there still a way to do this, or should I start over and split the tables?


You should certainly split the tables, but it's not necessary to start over;
in fact you can salvage the data that you've already entered.

Back up your database securely!!! (Well, that's something you should always
do, but particularly carefully before a major operation like this).

Create a new Billing table with a CustomerID field (as a foreign key to
Customers) and a BillingID field as a primary key (probably an Autonumber).
Add all the billing-specific fields, but none of the customer biographical or
contact information. Use the Relationships window to create a relationship
from the CustomerID field in Customers to the CustomerID field in the new
table, and check the "enforce referential integrity" checkbox.

You can then create an Append query to append the billing information from
your current table into the new table.

Set up your form using Customers as the recordsource for the mainform, and
create a Subform based on Billing, using CustomerID as the master/child link
field.

Once you're sure everything works, you can go into table design view for
Customers and delete the (now redundant) billing fields.

Post back with a detailed description of your tables and any problems that you
have if you run into rough spots.
--

John W. Vinson [MVP]
  #5  
Old March 17th, 2010, 04:24 PM posted to microsoft.public.access
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default How to add additional info without losing info

Yes, split into two tables with a one-to-many relationship.
The Customer information in tblCustomer with autonumber (CustID) as primary
key and unique index for the customer.
Use a form/subform with Master/Child links set on the tblCustomer.CustID.

--
Build a little, test a little.


"Ann" wrote:

Hi John -

Thanks for responding.

Being a beginner, I did a stupid thing to save time, which I'm sure will
ending up costing me much more time in the long run, but I put my billing
information in the same table as my Customer information. I know that's a
big no-no, but I was pressed for time.

Is there still a way to do this, or should I start over and split the tables?

Thanks.

"John W. Vinson" wrote:

On Tue, 16 Mar 2010 07:51:01 -0700, Ann wrote:

Hello -

I have a form that contains billing information such as Billing Reason,
Billing Date, Amount Paid and Amount Due.

What I would like to do is be able to click a button and have the fields
that are already populated, "clear" out and allow for additional information
to be entered, HOWEVER, I don't want to lose the information that was
"cleared" out to allow for the new information as I will want to query for
Billing Dates and the information associated with that date.

I hope I explained this enough to make sense.

If you have any ideas on how to make this happen, I would greatly appreciate
it.

Thanks in advance for your help!


First off...

Your form does NOT contain the billing information, any more than my office
window "contains" the Owyhee Mountain range. That information is stored in a
table, and only in a table; the form is just a window.

What I think you want is to have the form simply move to a new, blank, empty
record in your billing table... but I'm not sure how your tables are
structured. What's the form's Recordsource? Where (in your tables) are these
fields stored? How are your tables related?
--

John W. Vinson [MVP]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.