Default value for a text box

S

SHIPP

I created a form using the database wizard. I have two issues.

1. When creating the form through the database wizard it asked if I wanted
to create a text box for selecting records to include. I said yes. When the
form was automatically created it did create the text box. It also allowed me
to put a value in and that all works fine. The default value for that text
box was created by the wizard as follows:

<%=Server.HtmlEncode(Request("ShwYear"))%>

How do I change it so that it defaults to the current year automatically?

2. Can I make this a drop down box that is auto filled by the years
available within the table I am using as a source? And if so how?
 
M

MD Websunlimited

1. <%=Year(date)%>

2. Yes, but it will require that you query the database then iterate, with code, over the returned record set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top