Converting a String to a Control reference?

whenthegeeseinvade

Registered User.
Local time
Today, 02:24
Joined
Nov 12, 2008
Messages
39
Dear all

I am developping a database and I use a label on each form to write development notes as I go along.

When I double click the label, a form opens up and temporarily writes a reference to the control that opened it and also the contents of the label to two separate text boxes so I can easily edit the content.


ie:

txtOpenedBy:
Forms![frmPurchaseOrders]![sbfStockPurchaseRequests].Form![lblNotes].Caption

txtContent:
"To resolve - If supplier does not have a calculable delivery schedule, prompt for amount. If does, then auto-enter or prompt to accept calculated amount before placing order."



When I close the form, I wish to write any changes back to the original label caption.

I am having trouble getting the code right for this part. I need to use the string from txtOpenedBy to refer to the control itself and then update it's content with the txtContent string. I am sadly getting in a muddle over how to do this.

Any help a usual would be very much appreciated.

Thanks to all,

Laurence
 
What about looking at the on open event of the form and use something like this:

me.label.caption = "Enter the text as default"
me.label2.caption="Enter something else"

And so on.

I hope I am not missing the point of your thread.
 
This sounds like trying to write an encylopedia on PostIt notes.

If you are going to use the database for its own documentation then why not write it in a table? Put a button on the forms to show the relevant records on a popup form.
 
Hi Trevor

I have figured out a different way of handling it whereby I have creted a table which stores the notes for each of the forms I am working on.

Thank you very much for your help.

Best wishes,

Laurence
 
Cheers Galaxiom - Perfect analogy! That is exactly what I did.

Thanks for your help,

Laurence
 

Users who are viewing this thread

Back
Top Bottom