Copy contents of field to another field

  • Thread starter Thread starter gkmros
  • Start date Start date
G

gkmros

Guest
I have a Workorder application for a truck garage. I inherited most of the database and have been trying to automate several of the repetitve tasks.

I am nearing the end of a process, but I have one more hurdle to get over. On my main Workorder form I have the Workorder number pkWorkorderID, which is automatically generated when I open a new workorder record. It is an autonumber field but I format the field to give the number a different look. For example, on the Workorder table the number might be 24, but on the main Workorder form and invoices it is displayed as CHN100024. I need to copy this value to the RefNum field of another form called fPO. The RefNum is a text field and can accept any value, but since it is not used exclusively for Workorders I cannot change the format property.

How do I copy the full formatted Workorder number from the Workorders form and paste it into the RefNum field of the fPO form?:confused:

I can do it manually by using clipboard functions; highlight data from pkWorkorderID, copy it, paste it into RefNum field of fPO.

Gerry
 
gkmros said:
I have a Workorder application for a truck garage. I inherited most of the database and have been trying to automate several of the repetitve tasks.

I am nearing the end of a process, but I have one more hurdle to get over. On my main Workorder form I have the Workorder number pkWorkorderID, which is automatically generated when I open a new workorder record. It is an autonumber field but I format the field to give the number a different look. For example, on the Workorder table the number might be 24, but on the main Workorder form and invoices it is displayed as CHN100024. I need to copy this value to the RefNum field of another form called fPO. The RefNum is a text field and can accept any value, but since it is not used exclusively for Workorders I cannot change the format property.

How do I copy the full formatted Workorder number from the Workorders form and paste it into the RefNum field of the fPO form?:confused:

I can do it manually by using clipboard functions; highlight data from pkWorkorderID, copy it, paste it into RefNum field of fPO.

Gerry

Is the fPO form linked to the work order form. Is the fPO form a subform of the workorder form?

If so you could try set focus command, then copy command, then set focus to the fPO field and use a paste command.
 
Like Hootie said, where are these controls?
And from which form are you calling the procedure?

The Text property, will give you exaCTLY what you see.
You must set focus to the control first,before you can
access the Text Property. As opposed to the Value property.

Forms!Workorders.setFocus
Forms!Workorders!Workorder.SetFocus
Forms!fPO!RefNum = Forms!Workorders!Workorder.Text
 

Users who are viewing this thread

Back
Top Bottom