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

combo box

Status
Not open for further replies.

alifyag

MIS
Apr 15, 2002
18
US
hi,
i have a combo box which is going to contain certian fieldnames.
i want to have only certain fildnames in it and not all. i used the following code

Set rs = CurrentDb.OpenRecordset("Select top 1 * from Publishers;")
For i = 0 To rs.Fields.Count - 1
If rs.Fields(i).Name <> &quot;Balance&quot; Or rs.Fields(i).Name <> &quot;PubID&quot; Then
strNames = strNames & rs.Fields(i).Name & &quot;;&quot;
End If
Next i


i didnt want balance and publid in the combo...however this didnt work...
please lemme know
alifya
 
Try changing the OR to AND. Check your booleans.

If rs.Fields(i).Name <> &quot;Balance&quot; AND rs.Fields(i).Name <> &quot;PubID&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top