displaying output from code

C

cherrynich

I just used a count function in vb code, I need to display the output on a
box in a form i use to query a table, I coded it so when I hit the button to
run the query I also run the count function how do I display the output of
the count code on my form?????

thanks a lot
 
A

Alex Ivanov

1. This will bind your control to the function and will update the control
automatically when you navigate through the records.
In ControlSource property of your control type
=YourFunctionName(YourParameterList)

2. Leave the control unbound (unless you want to save it's value somewhere
in a table) and in the button's click event add something like
TextBox1.Text=YourFunctionName() ' control should have focus or
TextBox1.Value=YourFunctionName()

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top