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

Need a fresh to find the syntax error 1

Status
Not open for further replies.

haneen97

Programmer
Dec 10, 2002
280
US
Hi,
I can't see the syntax error in this. Please help.

Set RS = MyConn.Execute("SELECT * FROM '" & TableName & "' WHERE format('" & WhrCls & "') = '" & id & "'")


Thanks

Mo
 
do the exact same

if phyid<>"" then

you sql here

create variables here
PhyFName=rs("fname")
PhyMName=rs("mname")
PhyLName=rs("lname")
end if
%>

double check your fieldnames against your db

posst your code for phy
 
You are right, there was an error in the field name. They both work now, but the page loses the patient data after I go search for the physician data. It looks like they toggle or something.

Mo
 
because you are not passing the patients querystring to the phyiscians form
 
is this what you are doing

1.search for patient
2. verify patient
3. back to search page (shows patient info)
4. then doing a search for physician
5 verifying physiscian
6. back search page (shows physician, losing patient info)
 
Almost exactly
Open Order screen
Search for patient (open search result to verify)
Select the patient and go back to order
Search for physician (open search resutl to verify)
Select physician and go back to order
Only physician info on the order


This is the physician code part, where can I send the patId to physician.

<%
if PhysFound <> "" then
Set PhysRS = MyConn.Execute("SELECT * FROM Physician WHERE format(Physician_Id) = '" & PhysFound & "'")
PhysFName = PhysRS("Phys_First_Name")
PhysLName = PhysRS("Phys_Last_Name")
PhysMName = PhysRS("Phys_Middle_Name")
' RS.close
' set RS=nothing
end if
%>
<td width="54%"><form action="phys_search.asp" method="post" name="frmPhys" id="frmPhys">
<div align="left"> <strong>
<label>
<input name="PhysSearch" type="submit" id="PhysSearch" value="Find Physician">
<input name="txtSearchPhys" type="text" id="txtSearchPhys" value = '<%=PhysFound%>'>
</label>
<label> </label>
</strong></div>
<p align="left"> <strong>
<label>Physician First Name :
<input name="PhysFirstName" type="text" id="PhysFirstName" value='<%=PhysFName%>'>
</label>
<label> </label>
</strong></p>
<p align="left"> <strong>
<label></label>
<label>Physician Middle Name:
<input name="PhysMidName" type="text" id="PhysMidName" value='<%=PhysMName%>'>
</label>
</strong></p>
<div align="left"> <strong>
<label> Physician Last Name :
<input name="PhysLastName" type="text" id="PhysLastName" value='<%=PhysLName%>'>
</label>
</strong></div>
</form></td>
</tr>


Mo
 
you need to do something like this on your forms

<%
if request("patid") <>"" then
qs=qs&"patid=" & request("patid")&"&"
end if
if request("phyid") <>"" then
qs=qs&"phyid=" & request("phyid")&"&"
end if

%>
<form action="phys_search.asp?<%=qs%>" method="post">
 
No, Click on the patient record as it is hypred

Mo
 
on the link on the phy search page do a

<a href="firstpage.asp?patid=<%request("patid"%>">
 
but also adopt this code into your firstpage.asp


<%
if request("patid") <>"" then
qs=qs&"patid=" & request("patid")&"&"
end if
if request("phyid") <>"" then
qs=qs&"phyid=" & request("phyid")&"&"
end if
%>

...

<form action="phys_search.asp?<%=qs%>" method="post">
 
Ok Steve,
I had enough fun for the day. I accomplished and learnet a lot. I will some more with the application tomorrow and post if I have questions.

Thanks

Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top