467,151 Members | 925 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

controling the data control

I am trying to control my data control box with a combo box. I want the combo box to change the data control's record source. i have tryied to write an if then statement
if cbomoviecategory = action then
datmoviedatabase.recordsource = qryaction
else
datmoviedatabase.recordsource = moviedata
end if

i have tryied other things as well, but i have been unsuccessful.
how do you write code to control a data control's record source
Nov 1 '06 #1
  • viewed: 1028
Share:
3 Replies
sashi
Expert 1GB
Hi there,

Under which event did you wrote these codes? Click Event? or Change Event?

I am trying to control my data control box with a combo box. I want the combo box to change the data control's record source. i have tryied to write an if then statement
if cbomoviecategory = action then
datmoviedatabase.recordsource = qryaction
else
datmoviedatabase.recordsource = moviedata
end if

i have tryied other things as well, but i have been unsuccessful.
how do you write code to control a data control's record source
Nov 1 '06 #2
i have tried to write the if then statement in side the cbo click event, the cbo change event, and the dat reposition event.
Nov 1 '06 #3
sashi
Expert 1GB
Hi there,

Please provide more details such as partial code segment on your next post. In the meantime try the modified code segment below. Good luck & take care.

Expand|Select|Wrap|Line Numbers
  1. if cbomoviecategory = trim("action") then
  2.   datmoviedatabase.recordsource = trim("qryaction")
  3. else
  4.   datmoviedatabase.recordsource = trim("moviedata")
  5. end if
  6.  
Nov 2 '06 #4

Post your reply

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

Similar topics

5 posts views Thread by Cesar Andres Roldan Garcia | last post: by
17 posts views Thread by Lauren Wilson | last post: by
reply views Thread by Stefan Basler | last post: by
6 posts views Thread by Matthew | last post: by
9 posts views Thread by jeff | last post: by
1 post views Thread by Jeff Williams | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.