×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

datawindow

datawindow

datawindow

(OP)
Dear Sir/Madam,

I just wanted to seek help in creating a datawindow (dw_4) with the following requirements.

1) this datawindow consists of 3 columns ("acctno","name","age")
2) this table is intended to store a kids database (eg: how many kids do you have)
3) this datawindow is located in tabpage_3 (tabpage_3.dw_4)

scenario:

initially, this datawindow will display a single row. Now, if you have more than 1 kids and you are in the last column "age" when you hit [Enter] again a new row will be provided because of the dw_4.InsertRow(0) command. Let's say you have 2 or 3 kids and after encoding the details you are now ready to click the save button. Please take note that since these kids (2-3) belong to the same parent, the datawindow did not include the column "acctno".

Now the error upon clicking the save button was "accntno in table cannot be null". This is where I need help. couldn't figure out what approach to code the commands... Or if you have any simpler and easier suggestions on how to do it, I will really appreciate it.

Thank you.



RE: datawindow

(OP)
I got it.

RE: datawindow

please share how you solved it?

i think you just have to copied the value from parent datawindow and setitem it everytime insertrow occured

RE: datawindow

(OP)
oppss... so sorry about that zulmach. too much excitement in writing code. Anyways, you are correct and that's what I did. To enumerate:

1) you have to GetItemString() on "account_no" from the tablepage_1 since this is where the information starts. It's up to you if you want to pass the value to a variable that will make the command shorter.
2) you need to SetItem() this "account_no to tablepage_3 where the encoding happens for the kid's information.
3) tab_3.tabpage_3.dw_4.SetItem(1,"account_no",tab_1.tabpage_1.dw_1.GetItemString(1,"account_no") this command should be on your save event.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close