Normal Topic Tables (Read 1058 times)
Mum
Member
*
Offline


No personal text

Posts: 14
Joined: Jun 24th, 2005
Tables
May 12th, 2008 at 11:55am
Print Post Print Post  
  Undecided

Is it possible and if so how, can you enter new data in the top line of a table rather than the bottom line?
i.e. would save scrolling down before being able to enter the data.

OOops forgot to mention... table is in a subform.



  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Tables
Reply #1 - May 12th, 2008 at 12:51pm
Print Post Print Post  
I often put a set of unbound elements on the parent form with a button that creates the subrecord. That way, I can do all the validation before creating the subrecord and people don't have to type into a table.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Tables
Reply #2 - May 12th, 2008 at 2:21pm
Print Post Print Post  
Mum,

You probably know this but just incase, check out @FormNewRecord() to create the new subform record and then look at FormFieldValue() for filling it.

I do exactly what Hammer described (I’m sure not as elegant as her) and it works great.

I may not be correct in doing so but I always redraw my screen so my subform especially if its on a tab looks correct and then save my subform record and main record.

Below is a section of code (Maybe not the best way, but.. It works) as an example.

Keep us posted on your progress.


// creating new sub record in offerings and filling Subform elements

var nn as Int
           nn = @FormNewRecord("offerings")
           FormFieldValue("offerings", "OffereeId", nn, voffereeID)
           FormFieldValue("offerings", "OffereeNumber", nn, nn)
           FormFieldValue("offerings", "salespersonID", nn, vofereeSalesPerson)
           FormFieldValue("offerings", "OffereeName", nn, vofereefullname)
           FormFieldValue("offerings", "OffereeType", nn, "I")
           FormFieldValue("offerings", "Property", nn,  PropertyID)

           Forceredraw()

           // Save subrecord

           FormCommit("offerings")

           // Save Record
           FormCommit("property")
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Tables
Reply #3 - May 16th, 2008 at 12:24pm
Print Post Print Post  
I’ve been using your suggestions, Hammer & BOBSCOTT, to enter the data and it works great. However, my customer would like to be able to view the most resent entered data on the top few lines of the table also.

Any ideas would be appreciated.

Thanks,

Brandon
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Tables
Reply #4 - May 16th, 2008 at 1:21pm
Print Post Print Post  
tcgeo wrote on May 16th, 2008 at 12:24pm:
I’ve been using your suggestions, Hammer & BOBSCOTT, to enter the data and it works great. However, my customer would like to be able to view the most resent entered data on the top few lines of the table also.

Any ideas would be appreciated.

Thanks,

Brandon


Try setting a default Sort Spec.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Tables
Reply #5 - May 16th, 2008 at 1:46pm
Print Post Print Post  
Worked like dream!

Thank you!
  
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Tables
Reply #6 - May 16th, 2008 at 1:51pm
Print Post Print Post  
Now, if I can just improve my grammar!

Worked like A dream!
  
Back to top
IP Logged