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

Print current record of recordset on label printer

Status
Not open for further replies.

YoungCol

Programmer
Mar 27, 2002
4
0
0
ZA
I am a Real Newbee - one week to be exact! I have created a simple Access database and I need to print the data of certain fields of a particular record on a label printer.

I have tried opening another small ASP page with the fields I want and the layout then directing it to the printer but can't seem to lock the current record when I open up the next form - (please help)

Is there an easier method or tool to do what I am trying to do? I don't like activeX but someone must have built a tool for a similar job.
 
Would this not be easier to do in Access?

Still, what do you mean by 'Lock the Current Record'. You would typically send the key(s) of the required record(s) to a second page via the URL query string - just add ? followed by name=value;name=value;... pairs at the end of the URL:

On page 1, dynamically generate a list of links:

<a href=&quot;labelpage.asp?key=123&quot; >Print label 123</a>

on page 2 (labelpage.asp) get the key to the record to print from the asp request object:

sSQL = sSQL & &quot;WHERE item_id = &quot; & Request.QueryString(&quot;key&quot;)

so your SQL will utimately select a particular row.


If you are used to visual basic, then you may want to investigate using Design Time Controls (DTC's) and the Script Object Model (SOM). Together, these make things like this very easy (after you figure out how to use them!) (Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top