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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Titles in datasheet. 2

Status
Not open for further replies.

pdldavis

Technical User
Oct 29, 2001
522
US
Hi,

I have a subform set as datasheet. The subform recordsource changes depending on user selection:

StSql = "SELECT tblProcess.ProcessID as [Process Code], tblProcess.ProcessDesc as [Process Description] FROM tblProcess; "

I would like the field headers in the datasheet to display as "Process Code" and "Process Description " instead of "ProcessID" and "ProcessDesc", the field names in the table.

I rarely use data sheets so I may be missing something really simple here.

Any help would be appreciated.

Thanks, Dan

 
Hi, how do you use Caption in Sql? There is no label in the datasheet. Maybe it would be better to make a subform that looks like a datasheet?
 
There is a lot to be said for using a continuous form rather than a datasheet. If you wish to use the datasheet but show custom labels, you need to use the Caption property mentioned by rstitzel. Your subform probably looks like:
[tt]------------------
Label1 Label2
------------------
Field1 Field2[/tt]

Cut Label1 from the header section, click Field1 and paste. This will associate the label with the selected field. You can now change the label to read whatever you wish and it should appear as the column header for that field in datasheet view. You will, however, have a mess if you subsequently decide to use continuous forms.
 
Oh, Ok - I get it now. The labels were attached. I did not know the label caption would display as the column header and was a little confused as to what to do with the caption statement.

Thanks, Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top