Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Specific Records

Status
Not open for further replies.

markswan20

Technical User
Jun 17, 2005
58
GB
Good Afternoon everyone.

Please bear with me as this is a very complicated problem.

I have a database that i hold customer information both personal and product. The problem i have is i want my customers ID number to stay the same no matter how many times they purchase things from me. I have 11 combo boxs each holding different products and services attached to those are the prices boxes. What i was thinking about doing was creating another form with 1 big text box so that on my original form i would have a command button that took all the data from the combo boxes and the text boxs and put them all in the same box on the other form.

STILL WITH ME!

Now if this is possible what i would need to do is make it so that if the customer placed an order i'd click the command button transfer the information to the other box which would clear the original fields on the first form. Now the same customer comes back and places a second order say 2 days later i want to use the same customer number so i imput it on the blank form press the same command button and imput the information in the text box along with the previous information.

Is my problem easy to solve or is it a little long winded.

If it is possible or someone has had the same problem or might have an easier way to solve it i am open to ideas.

Kind Regards
Mark Swan
 
Depending on your database design, you should be able to do what you want. If I was designing this from scratch, I would have one table that contained the CustID, name, personal notes, etc. Then I would have a table that contained order information for the customer (can have multiple's), and whatever other tables that describe products, pricing, etc.

Yes, you could have one large text box to hold all of the info, but not sure why you would need that.

I'm a little scared by what you may mean when you say "..press the same command button and imput the information in the text box along with the previous information..." Ar you saying you would want to use the data contained in the 'large text box' to populate comboboxes for a new order? If so, that could be a nightmare trying to parse the data.

If your action "click the command button transfer the information to the other box..." was to just save the old order, that would not be necessary if you had several tables. You could simply create a NEW order record and then make your combobox selections and save the data.

Is this helpful?


"Hmmm, it worked when I tested it....
 
Thanks for your reply Trevil.

I originally looked into having a basic form with multiple forms attached for many different orders but I’ve already created my order form and don't fancy remaking it unless I really have to.

The comment about "..press the same command button and input the information in the text box along with the previous information..."

I want to do the opposite to your suggestion transfer the information from the form to the text box to be stored.

I think your idea is the easiest I’m just prolonging the inevitable.

Thanks again Trevil
Mark
 
If you want to go forward with the saving the info into a large text box, then you could build the text string 'manually' by specifying each control by name:

strAllValues = "CustID: " & me.txtCustID & vbcrlf & _
"Order Date: " & me.txtOrderDate & vbcrlf & ...........


"Hmmm, it worked when I tested it....
 
Thanks again Trevil.

I'll have a play and see what i can come up with.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top