<<
nop nop im doing the final testings on the database and it tells me that its an access database and i created some forms for making sure that it works properly
>>
I'm so confused. OK since this is an ASP board (and there is a separate Access board as you probably already know where you may want to repost your question if it is just straight Access with no ASP pages involved) I'll assume that the forms you're talking about are on ASP Web pages.
And for filling a listbox from data in a database you may want to check this out:
Classic ASP Design Tips - Fill a Listbox Possibly With Multiple Columns
http://www.bullschmidt.com/devtip-filllistbox.asp
Dynamically show the results in a listbox possibly with multiple columns based on data in a database.
You can fill listboxes for example to let a user choose a rep in a reps listbox.
To View "Fill a Listbox" Sample -
http://www.bullschmidt.com/devtip-fi...box-sample.asp
To Download "Fill a Listbox" Sample -
http://www.bullschmidt.com/devtip-fi...sample-zip.zip
To streamline code on the main page and easily allow many possibilities this uses a custom ASP class called objjpsvbBuildOption which resides in an included page.
Example:
<% ' Set sql.
strSQL = "SELECT UserID "
strSQL = strSQL & "FROM tblUser "
strSQL = strSQL & "ORDER BY UserID"
%>
<select name="UserID" size="1">
<% ' Create, use, destroy object.
Set objjpsvbBuildOption = New jpsvbBuildOption
objjpsvbBuildOption.DefaultValue = UserID
objjpsvbBuildOption.FldWidths = "100"
objjpsvbBuildOption.FldWidthPadding = False
objjpsvbBuildOption.AddedRowFlds = ""
Call objjpsvbBuildOption.Execute(objConn, objRS, strSQL)
Set objjpsvbBuildOption = Nothing
%>
</select>
And to see something like this in action you can do the following:
- Go to
http://www.bullschmidt.com/login.asp (the ASP Web database demo's login page)
- Click the Continue button
- On the Main Menu click the Customers Edit button
- On the Customers Edit Search Dialog notice the Rep and Customer listboxes