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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the Control Source

Status
Not open for further replies.

Nitrous270

Technical User
Jul 27, 2002
67
0
0
US
I have a combobox (cmbReleaseID) that I want to change the control source on from ReleaseID to CompReleaseID depending on the input given on a previous combobox (cmbArtist). So ...

If cmbArtist = "Comp" or "Sndtrk"
Then cmbReleaseID control source = CompReleaseID
Else cmbReleaseID control source = ReleaseID

Note: I know this code isn't useable i just thought it would help explain my problem.

Thanks,
Nitrous270
 
Nitrous270 (TechnicalUser)

If cmbArtist = "Comp" or "Sndtrk"
Then cmbReleaseID control source = CompReleaseID
Else cmbReleaseID control source = ReleaseID

me. should be Forms!("form name"). but you didn't give teh name.

sub cmbArtist_onLostFocus()

if me.cmbArtist.value = "Comp" then
cmbReleaseID.value = "CompReleaseID"
elseif me.cmbArtist.value = "Sndtrk" then
cmbReleaseID.value = "CompReleaseID"
else
cmbReleaseID.value = "ReleaseID"
end if

end sub


Something like that.

Hope it helps

Urbane Rove
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top