I'm doing a small project for a TaxiCab company. I will be collecting Trip
data for them. In the collection form I have two fields for selection boxes to
keep the time data in a 24 hour clock:
PickupTimeHours and PickupTimeMinutes
I like to take these two form input and get them to insert into the database
into a field called PickupTime. I want the date to look like this 22:40
I've been trying CFSET to concatenate with no luck.
I know the solution is simple, but it has alluded me. Can you point me in
the right direction?
Thanks,
...

Re: Combine Form Fields

Re: Combine Form Fields

The tag
<CFINSERT DATASOURCE="YCC_Trips" TABLENAME="Sept05Trips">
inserts all the form fields directly into the database. However, you wish to
modify the submitted values before inserting, so you can not use <cfinsert>.
Use something like this instead:

In the Insert Into statement, do I need the same number of values as the
number of fields in the table? If so, how do I handle the ID field (Primary
Key - Auto Number)? Here is a list of all the fields in the table:

Re: Combine Form Fields

This table contains around 35,000 records. The ID field is used to update
computer dispatched calls.
Do I need to create a sepearte table to receive new calls and import or join
this table with already existing call table?

No, nothing that complicated. If you're using the automatically generated
tion ID, which I assume
you are, then you only have to use a different version of the INSERT query.
One which inserts data for
every column, except the ID column. The MS Access database engine will insert
the new ID automatically.

Re: Combine Form Fields

Thanks BKBK.

Before I got your message I setup a seperate table, makikng the application
run a bit faster. It will be a simple matter to import the new table into the
old at the end of the month when the company needs to generate an Excel table
for the Airport.