Copying data from one form into text box on another form

bd200

New member
Local time
Today, 00:53
Joined
May 16, 2014
Messages
5
Hi guys,

As some background info I work in a small business with my brother and father and get a lot of our orders via email. We had a database on access 2010 made a little while back by an "access developer" that i have been adding too and tweaking ever since with my very limited knowledge.

I'm very new to VBA and have spent the entire day trying to accomplish something I am sure is very simple if i knew what i was doing !! :banghead:

What I'm trying to accomplish is some sort of 'Order Confirmation' (filled with the info i have entered in my order form and sub_form fields) that i can copy and paste as a reply to their email-order.

I have taken 2 failed approaches so far:

1) I used a report to display the info

Private Sub Command103_Click()

DoCmd.OpenReport "Order Confirmed", acViewReport, , "OrderID = " & Me!OrderID

End Sub

This worked fine until the information was copied and pasted into outlook which upon doing so changed the column titles and layout

2) I used another form with a text box to fill with the data entered on the Order form

DoCmd.OpenForm "frm_Order_Confirmation"
[Forms]![frm_Order_Confirmation]![txtConfirmation_Text] = "Ref.:" & " " & [txtCustomer_Order_Reference_Number] & [vbNewLine] & "Item No.:" & " " & [cboProductID].[Column](1)

I got stuck here when trying to reference the data in the sub form...
Also each order can have one or more colours and i have no idea how to allow for this ?

Any help would be so greatly appreciated and if you have any questions please feel free to ask me

Thanks in advanced guys
J
 
Referncing controls in forms form other forms is done like this: http://access.mvps.org/access/forms/frm0031.htm

If all else fails, create a new textbox, in the property Control Source click the ellipses and choose th expression builder. There navigate to the desired control and click paste. Now you have an expression you can copy.

"This worked fine until the information was copied and pasted into outlook which upon doing so changed the column titles and layout " You COPIED - by hand - info from a report? Noooo.

Search in the Reports forum for mailing reports - thousands of posts about how to do it.
 
Hi Spikepl thanks for quick the reply...

"If all else fails, create a new textbox, in the property Control Source click the ellipses and choose th expression builder. There navigate to the desired control and click paste. Now you have an expression you can copy"
- I used this to avoid having to directly refer to the sub-form as i still couldn't manage to get it to pull the data that way. Thank you!!

Now my only issue is when my subform has more than 1 rows in the column,
i need to concatenate the data into the textbox onto another form so i have:

description : qty
description : qty
etc..

I have tried using the following but to no avail: :banghead::banghead:
access.mvps.org/access/modules/mdl0004.htm

Any help is much appreciated !
 

Users who are viewing this thread

Back
Top Bottom