By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 2,482 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Transferring data from one form to another...

stonward
100+
P: 145
Hello again folks,

I am having kittens here...my User keeps adding to the requirements - true scope creep in the best tradition of software design, eh?!

Simple one first,: I have a quotations form, and I also have an invoicing or Sales Form. When a customer moves from a quote to a sale, i need a way to click a button on the quote form, and all the data be transferred to the invoice form. Naturally the fields are the same.
Can someone show me the syntax for this?

Thanx,

Stonward.
Sep 17 '07 #1
Share this Question
Share on Google+
3 Replies


FishVal
Expert 2.5K+
P: 2,653
Hello again folks,

I am having kittens here...my User keeps adding to the requirements - true scope creep in the best tradition of software design, eh?!

Simple one first,: I have a quotations form, and I also have an invoicing or Sales Form. When a customer moves from a quote to a sale, i need a way to click a button on the quote form, and all the data be transferred to the invoice form. Naturally the fields are the same.
Can someone show me the syntax for this?

Thanx,

Stonward.
Hi, Stonward.

I guess the "all the data" is being "transferred" on the table level. ;)
When you need a form to be repopulated with it's recordsource data you should just invoke Requery method of the form.
e.g.
Expand|Select|Wrap|Line Numbers
  1. Forms![Sales Form].Requery
  2.  
Sep 17 '07 #2

stonward
100+
P: 145
Sorry FishVal, but that's not it...I'm aware of the requery event. Indeed, I've SEEN the code I'm looking for now, but can't find where, and can't yet seem to get it right - tho' I'm working on it still.

I have, say, field1 on form1, and i want to transfer field1.value to form2.field1.value. (Do you like my pseudocode?!

Thanx,

StonwardR
Sep 18 '07 #3

FishVal
Expert 2.5K+
P: 2,653
Sorry FishVal, but that's not it...I'm aware of the requery event. Indeed, I've SEEN the code I'm looking for now, but can't find where, and can't yet seem to get it right - tho' I'm working on it still.

I have, say, field1 on form1, and i want to transfer field1.value to form2.field1.value. (Do you like my pseudocode?!

Thanx,

StonwardR
Hi, Stonward.

You can refer to objects of any opened form via Forms collection.
e.g.
Expand|Select|Wrap|Line Numbers
  1. Forms![Some form]![ctlField1] = .......
  2.  
But your intension seems to be bizzare. Do you want to use form for programmatical data transferring? Whats wrong with data transferring on table level via SQL, Recordset or bound control on the same form? What supposed to happen if the receiver form is closed, transfer fail?

I mean form object is dedicated for manual data input. Code may use more reliable ways. Hope this makes a sense.

Regards,
Fish
Sep 18 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.