Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unbound Memo control on a form 1

Status
Not open for further replies.

MrMode

Technical User
Aug 28, 2003
195
GB
I have a form where I need unbound controls that I populate through VB. One field I want to pull across is a memo field. The Text Box and Combo box control truncate the text at 255 characters.

I have tried using a subform, but this is really ugly and uses loads of screen real estate.

Is there a control that I can repurpose as an "unbound memo control" that I can then get the text into via vb?

Thanks in advance for your suggestions and advice.
 
A text box should work. My guess is that your query or code is truncating not the contol. Provide the qry and code.
 
Hmm

My code is not working either...

Me.Text152.Value = DLookup("[portaldata]", "[Description]", "PortalData.[Company ID] = " & Me.Company_ID)

The table is PortalData
The field is Description
 
if companyID is text then you need
"PortalData.[Company ID] = '" & Me.Company_ID & "'")
 
No it is a numeric reference.

Have I got everything in the correct place with the correct syntax? It doesn't seem to return any results at all...
 
No, you don't; you've reversed the Table and Field. Try this:

Code:
DLookup("Description", "PortalData", "[Company ID] = " & Me.Company_ID)


The Missinglinq

Richmond, Virginia

The Devil's in the Details!
 
Awesome! Evil computers...

Thanks so much!

 
How are ya MrMode . . .

Is [blue]portaldata[/blue] the field or the table ... can't be both!

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
All sorted thanks TheAceMan1

PortalData is the table, Description is the field - I did not choose the names :)

 
I'm guessing that
MrMode said:
...I did not choose the names...
probably means that you cannot change them, either, which is unfortunate!'Description' is a Reserved Word, in Access, and using such words as names can lead to unexpected results/problems. If you can modify this name it would be wise to do so.






The Missinglinq

Richmond, Virginia

The Devil's in the Details!
 
Yes, there are lots of them and reserved characters. i did not know Description was a reserved word, thanks for letting me know!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top