The help manual sez “The copy statement copies the contents of the current field onto the clipboard.”
Which is what I want to do, but in fact it copies the current CELL, not field. Or in my experience that’s what it does. I would like to quickly grab the contents of a field. I have a procedure that copies the field into a text file, but I just want it on the clipboard this time around.
It depends on what the meaning of the word “is” is. In this case, I thought Cell and Field would be synonymous. In other words, “Container”. BUT - trying an experiment - I see the cell content is copied if I click in the Cell and Cmd-C. But with the field - if by field you mean form variable - it is not; the content has to be selected first.
You would like to quickly grab the content of a field. Can we assume the field already has focus? What would be “quick”? A mouse click? A click, and select from a menu. A hotkey combination?
Perhaps giving us a state of things before and a state of things after would help to see where you want to go.
In my world, a “Field” is just the name of the “Cell”. I have a field called Train, and in each record, the Cell for Train contains different data; Southern Pacific, Shasta Daylight, Seal, Santa Fe, Great Northern, etc.
It sounds like you are using the term Field differently. Not wrong, just different. So I need to know what your “Field” is.
This is basically the same as Gary’s code except that this version will automatically pick up the name of the current field. Also, my version will only grab selected items, which may or may not be what you want.