Could you please elaborate on how I would do this? Right now my test app begin with 2 global char* with 2 different names. I can get and set the text to the fields but when I enter a string longer than the original global and try to set the field with that text, I get a fatal error.
Thank you Jim <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Make sure that Text is pointing to a valid memory location, and that > space is large enough to contain the entire TextP; > > > Jim Duffy wrote: > > > > I hate to ask this since so much has already been posted about fields, > > but.... > > > > I can't seem to be able to get the text from a field and copy it into a > > string. Setting the text to the field is no problem. > > > > the code is > > > > static void GetFieldText(UInt32 FieldID, char *Text) > > { > > FieldPtr FieldP; > > Handle FieldHand; > > CharPtr TextP; > > > > FieldP = (FieldPtr)GetObjectPtr(FieldID); > > FieldHand = FldGetTextHandle(FieldP); > > TextP = MemHandleLock(FieldHand); > > StrCopy(Text,TextP); > > } > > > > I also tried > > > > { > > TextP = FldGetTextPtr(FieldP); > > StrCopy(Text,TextP); > > } > > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
