
Waspman
Posts: 948
|
| Posted: 05/10/2006, 5:42 AM |
|
Is this possible?
Populate an editable grid using the data from one table and saving inputs to a joined table.
_________________
http://www.waspmedia.co.uk |
 |
 |
Chris_T
|
| Posted: 05/10/2006, 9:04 AM |
|
Sounds similar to something I was using with records. I used a record builder pulling data from Table A. On the record, it brought up some data from Table A, then I made text boxes for the user to input more data. Then when the user hits submit, it saves to Table B
I did this:
Record builder....then used Table A when they ask for the table/fields.
After you have everything set.....click code tab and go to the Record forms update and insert functions. I renamed the insert function update so the button would show up for the user. In the code where it says:
"Cmd.SQL = "INSERT INTO Table A(".............
you substitute Table B, so the insert puts everything into table b.
So this might be something similar with the grid
|
|
|
 |
Waspman
Posts: 948
|
| Posted: 05/11/2006, 5:33 AM |
|
Thanks Chris,
Tried it many ways inc, custom insert. I don't think its possible.
So reverted to normal procedure - Show grid using filtered Table A data - link to insert form to add data to Table B passing required parameters etc.
Client wanted it to easy (lazy bathtub)
_________________
http://www.waspmedia.co.uk |
 |
 |
DonB
|
| Posted: 05/12/2006, 5:53 AM |
|
Yes, with a caveat. The "Custom Insert" and "Custom Update" properties can
reference a different table than does the main "Data Source" property.
Where it gets tricky is the insert vs. update dilemma. The determination of
whether an insert or update is needed is based on the main table, not the
'custom' table. So if the row exists in the main table and not in the
custom table, you will attempt an update - and it will fail.
It's safer, but more work, to handle all this in the insert or update
events. You can always kill the main data source action by setting
CmdExecution to false within one of these events, and execute your own
insert or update instead.
--
DonB
http://www.gotodon.com/ccbth
"Waspman" <Waspman@forum.codecharge> wrote in message
news:64461dfb0c96a6@news.codecharge.com...
> Is this possible?
>
> Populate an editable grid using the data from one table and saving inputs
to a
> joined table.
>
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|

|
|
|
|