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

Layout of the report

Status
Not open for further replies.

tar28un

Technical User
Nov 29, 2005
58
0
0
GB
Hi there,

I am wandering whethere is there is any way so that the layout of the report is designed first. Is it possible to give the textbox or a label a reference to a particular value in a coloumn say for e.g If I create 4 text boxes in a form. Can I refer the first text box to the first value in first coloumn of the table and second text box to 3rd value in 2nd coloumn and so on.

 
Hi. This is a little confusing. This is the "Reports" forum, yet your example is for "4 text boxes in a form". Not sure what you mean. A report is based on a query or table, maybe you can write a query to get the results you want. Or you can use DLookup() function to get particular values from a table.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Yes. You can use a recordset:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tblTable")
rs.Move 3
Me!txtText = rs!Field3
End Sub

And you can use DLookUp; there is an FAQ on this.
 
I am very sorry. I actually want to say report. Is it possible to refer to particular field values in a text box or label in report
 
GingerR, sorry, forgot to refresh.

tar28un, you can use DlookUp, as suggested by GingerR (there is an FAQ) or a recordset (see my post above).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top