displaying output from code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top