(Note: this is a very quick, simplified and off handed explanation!:)
All you do is insert VB code into a HTML document. This code is being passed
a value for Personnel_no and CompanyNumber which has been set when the user
logged in. This is then used to show data for that employee.
eg.
Code is surrounded by <% %>
An equal sign will return the result of the code into the resulting HTML
document
eg. <%= rsEmp![EmployeeName]%>
---------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim MM_core_STRING
MM_core_STRING = "DRIVER={SQL
Server};SERVER=INSERTSERVERNAME;DATABASE=INSERTDAT ABASENAME;UID=INSERTUSERNA
ME;Password=INSERTPASSWORD"
response.expires = 0
dim rsEmp
dim mySQL
dim pid
dim cid
dim company
pid = session("pid")
cid = session("cid")
company = session("company")
mySQL = "SELECT * FROM tblSPStatement WHERE [Personnel_no]='" & pid & "' And
[CompanyNumber] = '" & cid & "';"
Set rsEmp = Server.CreateObject("ADODB.Recordset")
rsEmp.ActiveConnection = MM_core_STRING
rsEmp.Source = mySQL
rsEmp.CursorType = 0
rsEmp.CursorLocation = 2
rsEmp.LockType = 1
rsEmp.Open()
%>
<html>
<head>
</head>
<body>
<%
Do Until rsEmp.EOF
%>
<p> <%= rsEmp![EmployeeName]%> </p>
<%
rsEmp.MoveNext
Loop
%>
</body>
</html>
---------------------------------------
I'm sure there are lots of web site that explain how to build ASP pages
better than I:)
--
Bradley
Software Developer
www.hrsystems.com.au
A Christian Response
www.pastornet.net.au/response
"PC Datasheet" <sp**@spam.nospam> wrote in message
news:gp*******************@newsread3.news.atl.eart hlink.net...
Bradley,
You said in another post --
<A simple way to do it is to embed a connect string to your
database that your code uses to access your database then use code to
determine what the person can see/access.>>
Can you give a simple but practicle example on how to do this?
Thanks!
Steve
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:40******@nexus.comcen.com.au... "intl04" <kr***@hotmail.com> wrote in message
news:41**************************@posting.google.c om... Is it possible to create a Word form as the data entry form for an
Access database?
Do you mean you want to import data from a Word form that you have
distributed to users?
I didn't see any reference to this possibility in my
Access books, so I'm sorry if this is a question that is rather
off-the-wall. I was asked to ask this question, to see if a Word form
can be linked to an Access database
Mail merge?
Linked can mean many things:)
and then emailed to various
Now this is what I need to know... how to do a mail merge then email
each seperate merged page to that person's email addresses???
end-users for them to complete task requests using this form.
Do you then want that data to go back in your database??
If it were me, I'd consider setting up a web page form directly linked
to my database (or another database that I can import from if I want to keep
my other data elsewhere) :)
If you only want to generate a form in Word that is static (send to
users for them to view) then probably easiest to create a report and use
DoCmd.SendObjects to email it to each user....
--
Bradley
Software Developer www.hrsystems.com.au
A Christian Response www.pastornet.net.au/response