Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count rows and values from a subform into a textbox?

Status
Not open for further replies.

0200050

Programmer
Jun 3, 2003
58
FI
Hi there everyone!

Does someone know, how to count, firstly rows, and secondly values from a subform that is bounded to a query?

These number of rows, and other values would afterwards be applied to textboxes, if it's possible.

Any suggestions about the issue?

Thanks in advance,

Mike, finland





 
Hello ZmrAbdulla! Thank you for answering.

Well, that seems quite good way to make this work, but if I'm trying to place an unbound textbox to the footer of the subform, it doesn't display the textbox at all.

That's because the subform is made of a query. Queries are in table view((?))

But, could the RecordSource = Sum([TableName]) use some Subform -part?

Mike, finland

 
Hi,
Sorry, It should be Contol Source NOT Record Source
It was my mistake.......

I feel you want the subform value to be displayed in a textbox on the main form.
And your subform is in the datasheet view.
Change it to Continues form view

Properties > Format > Default View > Continues Form

Or

Put another textbox on the main form and set
ControlSource=YourSubformName.Form!TextboxNameonFooter

Post return if this is not right.

Zameer Abdulla

 
Hi again! I tried both recordsource- and controlsource -properties, but they didn't work out.

Maybe they didn't work out because I wasn't able to set them right up.

What do you think, should I use here VBA-code, or just use those so called conditions??

Could you give a more specifical example about the use of ControlSource -property?


I tried this sample, 'cause i wasn't able to work out with those you gave:

Forms!Form1!txtMyTextBoxName.ControlSource = "AnotherTextBoxName"

But the truth is, this isn't really working out either.

So would you like to give a bit clearer instructions?


Mike, finland





 
Hi, wow, that really looks helpful. I actually sorted this out other way, but thank you anyway!

Mike, finland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top