making a drop down list dynamic for form submissions

  • Thread starter Thread starter goldcomm
  • Start date Start date
G

goldcomm

Please Help-My task:

Provide a sign up form that allows the user to select from
a list of dates and times (one field: date_time) from a
drop down list. They also enter their name in a separate
field. This is done on a form that is submitted to an
Access database.

The challenge: Eliminating the data and time from the drop
down list after a user has selected it, so that the next
person accessing the form cannot select the same date and
time.

Any suggestions would be very appreciated-Thanks!
 
Ok, you will need a minimum of two tables in your database and custom ASP
coding.

One table will contain a field with date/times available with a YES/NO
field, the default value for the YES/NO field will be Yes. You will build
your query to load the drop down menu based on the value of the YES/NO field
being Yes.

As a user submits a form, you will need to update both tables, the Available
table to set the YES/NO field to No based on the Record ID of the selected
Date/Time and then write the user submitted data to your SignUp table, etc.

Good luck.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Thank you Thomas - I thought about a form with a hidden
boolean field that goes into a database column
named "booked" when the name and date_time is submitted -
then doing the dropdown menu as a database results with
the booked column as the criteria for displaying the
date_time- but that would be trying to make the output
(results) the input to the form and I don't know if that
is possible. You are saying something similiar I think-
but I don't know how to use the output (Database Results)
As an input for a form submission.

Another idea I had was from page 891-892 of the book
MSFront Page Inside Out where drop down lists are
discussed. The author gives some code that allows you to
have options selected for Recycling Form Element Values as
follows:

<%If (Request("ddbox1") = "1" Then
Response. Write " selected "
End If

%>

I'm assuming "ddbox1" references option one in my drop
down list and the "1" is a conditional that checks the
status of the option, meaning if it is "1" it is selected
so proceed with the rest of the code. Is this correct?
Would option two be "ddbox2" ? Could I use that and
replace Write "selected" with some command that hides or
removes the option? Does anyone know of a command to do
that?

What do you think is the best approach?

Thank you!!!!
 
As I indicated this requires hand coding. I don't think this is something
that is easy to accomplish using the FP database component, which I don't
use, so I can not provide any help in using it.

Basically all you are doing is loading a form, that populates the drop down
from a database, that you should be able to accomplish with FP, however
splitting the database based update to handle two table is where I think you
have to do the hand coding.

You don't need to worry about "recycling form element" since each time the
form is loaded, the drop-down will contain the current available
dates/times.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
At the risk of sounding dense- that is exactly my
question: "Basically all you are doing is loading a form,
that populates the drop down
from a database, that you should be able to accomplish
with FP". (And the dropdown is updated either each time it
is loaded or after each submission.) How do you accomplish
that?
 
Ok, you will have to wait for someone that use the FP database component to
help you with setting that up.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Thanks anyway- I'm going to submit another post amd make
sure I make it clear that I want to use the Front Page
data base component to do it...
 
Back
Top