Fill Lookup Table

B

bw

The CancelRequest procedure below displays the values that are present
in tblSelectMainReport. I want to "collect" all of these values, and then
display
them to the user so that he/she may select one of the values to cancel
(delete).
My idea is to show a combo box (or something similar) with all of the
values,
but I don't know how to fill the combo box with the values. Some
suggestions
would be appreciated.

Thanks,
Bernie

Public Sub CancelRequest()
Dim RNum, i
For i = 1 To 10
RNum = DLookup("RequestNum", "tblSelectMainReport", "RequestNum = " & i)
If IsNull(RNum) Then
Else
MsgBox RNum
End If
Next i
End Sub
 
G

Graham R Seach

Add the following to the combo's RowSource property:
SELECT RequestNum
FROM tblSelectMainReport
WHERE Nz(RequestNum,0)
BETWEEN 1 AND 10

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top