Author |
Topic  |
|
govictor
Starting Member
USA
2 Posts |
Posted - 02 June 2011 : 18:04:42
|
I was wondering anyone would be able to point me to the right direction on where I can find information for a web form I am working on. I would like the form to auto populate with name, email, phone number etc. once I enter an email address. I would also like the to insert the new requestor information in the table if they are not found in the table. The current form was created using asp. I appreciate your help.
victor |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 03 June 2011 : 01:13:27
|
Basically you have your asp code add the appropriate Value attributes to each form element in the html stream. |
====== Doug G ====== Computer history and help at www.dougscode.com |
 |
|
govictor
Starting Member
USA
2 Posts |
Posted - 03 June 2011 : 10:20:57
|
Hello Doug, Thanks for your response. I am new to asp. would you please be able to give me an example. This is the code I have been able to come up with but I do not know what I am missing:
<% Dim EMAIL EMAIL = nz(DLookup("[EMAIL]","REQUESTOR","[EMAIL]=" & Me!EMAIL),0) If EMAIL = 0 Then Msgbox "This requestor does not exist in table Requestor"
<% Private Function RecordExists() As Boolean Dim WebProjects.mdb Database Dim MM_editCmd As DAO.Recordset Dim MM_editCmd As String
'Check that all the relevent controls meet the criteria If Nz(Me.FIRST_NAME, 0) > 0 AND Len(Nz(Me.LAST_NAME, "")) > 0 AND Len(Nz(Me.PHONE_NUMBER, "")) > 0 AND Len(Nz(Me.DEPARTMENT, "")) > 0 AND Len(Nz(Me.EMAIL, "")) > 0 Then MM_editCmd.CommandText = SELECT (FIRST_NAME, LAST_NAME, PHONE_NUMBER, DEPARTMENT, EMAIL) FROM WEB_REQUESTS WHERE ) Me.FIRST_NAME & ' Me.lAST_NAME & ' Me.PHONE_NUMBER & ' Me.DEPARTMENT & """" Me.EMAIL & """"
%>
I appreciate your help. Victor
quote: Originally posted by Doug G
Basically you have your asp code add the appropriate Value attributes to each form element in the html stream.
|
 |
|
Carefree
Advanced Member
    
Philippines
4212 Posts |
Posted - 26 June 2011 : 06:41:09
|
Here's an example. Note the bits in red. The first table/form simply requests the Email address & submits the form to check it. If it's found, the second table will be populated with the fields from the database; otherwise the error message will be displayed. If the second form is submitted and the EMail account exists, the information in the database will be updated, if the EMail account does not exist, the information will be added to the database.
|
Edited by - Carefree on 26 June 2011 07:11:15 |
 |
|
|
Topic  |
|
|
|