SendObject Help please!

Kroghr

Registered User.
Local time
Tomorrow, 02:24
Joined
Oct 20, 2008
Messages
17
DoCmd.SendObject acReport, stDocName, acFormatSNP, , , , Me.StartDate & " through " & Me.EndDate & " From " & Me.LstOrigin & " To " & Me.LstDestination

LstOrigin and LstDestination are both list boxes populated form a table. The values in both boxes are PKWA PKRO PKMJ PWAK. How can i make the Origin and destination display the text value (PKWA), rather than 1??????


Thanks
 
It looks like a Bound-Column thingie.

Try looking at the "Bound Column" at the List-Box properties on the form.
This should be bound to the column in which you have the text you want.
If this is not possible you can always query for the text.


m0use
 
If the text data is not the first column in your list box then this will be why it's not coming through. Hidden columns count for this, so it's easiest to check the recordsource to find out.

If it's not the first column it's usually because it's not the primary key, and the primary key should be the first (and bound) column. So you don't want to change your list box, just the way you reference it. You need to use:

Me!LstOrigin.Column(1)

...assuming that the text column is the second column. Note that column numbers start at 0.
 

Users who are viewing this thread

Back
Top Bottom