transfer field contents to another field

alkrm

Registered User.
Local time
Today, 15:18
Joined
Aug 13, 2003
Messages
39
hi ,
i have two forms of two seperate tables.
Form 1 , has these fields : Name "Text", Issue"Memo",Action"Memo",
Form2, has these fields : Task ID"Number", Task Subject"Text of 200 characters",

what i want to create is : to create a button at form1 that when i press it opens me form2 with the contect of Action field as New record in Task Subject .

Note: "without Relations between the two tables"

thanx in advance
 
Create the command button on form1. Use the DoCmd.OpenForm method to open form2. Then set the value of the TaskSubject field on form2 to be equal to the Action field from form1.
 
DX
this ain't working !
i need the button so i can count some choosen actions as a tasks , so when i press the button ,it takes me to the task form with the action as new task subject.

in ur answer , it will take count all the actions as tasks, n there 'll be no need for the button.

is there is any thing to add with the code of the button , so it open the first Task form with new records and the Action As New Task Subject???

""
 
First, you're setting yourself up to lose some data, since you're copying the text of a memo field into a text field of limited length.

That said, dcx gave you a straightforward solution--it may be that you need to clarify the problem a little more. Is your difficulty in copying the info at all, or in copying from one specific selected "action" to a new "task" record? Is your action form a single-record or continuous view?

--Clarity-Now Mac
 
the data in the action field , i want it to transfer to the task subject when i press the button.

am using this ,n still it just open the Task assign form without sending the content of action as new task subject !!

Dim x As String
Dim y As String

x = "TaskAssign"

y = "[Task Subject]=" & "'" & Me![ACTION] & "'"
DoCmd.OpenForm x, , , y

'what is missing here, any suggestion ,
?
 
What's missing there is the other side of the operation. You can't just pass the form an openarg and expect it to know what you want done with it--you have to have code in the OnLoad event of the second form that takes the openarg and puts it in the control you want it in.

That said, I would advise you to use dcx's suggestion. Create the button on the first from. In the OnClick event for that button add code like:
Code:
DoCmd.OpenForm "frmTwo", , , , acFormAdd
Forms!frmTwo.Controls!txtReceiver = Me.txtSender
Don't forget to use your own form and control names in the above. Also, realize that you are setting the value of the CONTROL, not the field. The value in the control will get stored in the field when you save the record.

--Suggestive Mac
 
YAH, THAT SOLVED MY PROBLEM

LOT OF THANKS FOR THE GREAT HELP I GOT ,
FROM BOTH OF U
 

Users who are viewing this thread

Back
Top Bottom