Home > Microsoft Access Help > On Click

On Click



Hi,



On one of my forms I need a button that when clicked on would update a field in a table. Is this possible?



Thanks in advance



Steve

    
Guest


Yes. Absolutely.



<form name="form1" action="updatedb.asp" method="post">

<input type="text" value="1" name="id">

<input type="submit" name="submit" value="Submit">

</form>



So when the user submits the form above, you are redirected to updatedb.asp. Whatever is in the form will be passed to updatedb.asp. In this example above, the "1" for "id" gets passed to updatedb.asp. From that page, you can grab the id value as follows:



<%

Dim id

id = request.form("id")

'---insert database code that will update a record with id that is passed in...

%>



There are many variations as how to accomplish this. But this is a start.

Hope this helps

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved