Yah I have found out about it already. Thnx dude. 🙂 But I have another question here : I am using Commandtext as the SQL statement. Is it possible to execute it like this:
Set rsbanner = newscmd.Execute ??
I have tried it but found that they are asking for the initialisation of my newscmd which i have initialised in a seperate include file.
my code looks something like this:
counter = AddBanner.BannerType.SelectedIndex
If counter = 1 Then
loc = "Top"
If counter = 2 Then
loc = "Side"
loc = ""
If loc <> "" Then
If loc = "Top" Then
newscmd.CommandText = "Select * From Banner_Top"
If loc = "Side" Then
newscmd.CommandText = "Select * From Banner_Side"
Set rsBanner = newscmd.Execute
If not rsBanner.EOF or rsBanner.BOF Then
countban = 0
Do While not rsBanner.EOF
countban = countban + 1
AddBanner.ID_Num.Value = countban
Above is my function coding....Any idea why it is not working?