Creating a Record [message #403383] |
Fri, 15 May 2009 04:46 |
anugraha
Messages: 15 Registered: February 2009
|
Junior Member |
|
|
Hi All !
I have created form based on a table ..
In that for say 4 fields alone i want a record to get created when click a button with the coding
But this is not happening ..
So when i tried with two datablocks based on same table in a canvas, then the records getting saved as different rows..
All i want is the fields entered in the form must be stored as single record( the new records created for certain fields in the second datablock and the records in the first datablock)..
pls help to achieve this !
Thanks and Regards
anu
|
|
|
|
Re: Creating a Record [message #403386 is a reply to message #403383] |
Fri, 15 May 2009 04:59 |
TonyJaa
Messages: 50 Registered: May 2009
|
Member |
|
|
I don't understand your problem but create_record will create a new record in the current Block. So the button must be Non-navigable. Or make a Go_block in the when-button-pressed.
|
|
|
Re: Creating a Record [message #403387 is a reply to message #403384] |
Fri, 15 May 2009 04:59 |
anugraha
Messages: 15 Registered: February 2009
|
Junior Member |
|
|
Hi !
What i try to achieve is this..
I have created a form with 25 fields ..
Now, in this for particularly around 4 fields alone, the user has to give multiple input ..
When i place a button in my form for create_record, it clears my entire form and gives a new record to enter..
But i need new record to enter for those 4 fields alone..
How am i to achieve this?
Or is there any other solution?
Thanks and Regards
anu
[Updated on: Fri, 15 May 2009 05:17] Report message to a moderator
|
|
|
|
Re: Creating a Record [message #403391 is a reply to message #403389] |
Fri, 15 May 2009 05:33 |
anugraha
Messages: 15 Registered: February 2009
|
Junior Member |
|
|
yes, i already tried by creating a separate table for those fields..
For example consider:
I have 2 tables. book and book1
Book table has the fields:
Bookid, Bookname
Book1 table has the fields: Bookid, Author
Now for this book1 table, i have placed a button for creating new record, for making multiple entries for author provided the bookid of book and book1 are same ..
when i save after filling these fields, it gets saved in its corresponding table ..
But when it comes to retrieve, iam able to retrieve record in book table and one record for book1( But more one entry has been made for the author field for the same bookid using create_record)..
How can i view all the authors of particular bookid ?
when i click next_record, it gives the message
Do you want to save changes made?
pl help .,
Thanks and Regards
anu
|
|
|
Re: Creating a Record [message #403394 is a reply to message #403391] |
Fri, 15 May 2009 05:52 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
OK, we have agreed that 2 tables should be used. I'd suggest you to do that now.
Delete (i.e. abandon any work on) an existing form.
Create a new form from scratch. Use data block wizard. As "author" can be an "author of more than one book", I presume that "author" should be master and his/her "books" detail block. If you have correctly set that up during tables' creation process, Forms Wizard will know about it and automatically correctly set relationship between those blocks.
You may choose how many records to see in each of these two blocks (for example, 1 record for authors and 10 records for books).
Forms default behaviour is such that you don't have to code ANYTHING to make it properly work. NOTHING at all! No "create record" buttons - just use its built-in functionalities.
Once you make the form work, make it fancy (if you wish).
|
|
|