Hello there
I am total green in access specially in VBA world and trying to learn during my free time
I am able to learn to learn how to assign values to LISTBOX, based on already created Query (using Wizard)
Now I am trying to learn, HOW to create the query through VBA and assign to listbox instead of first creating query
What exactly I am trying to learn is upon opening of the my listbox show already existed records (for information)
Thanks in advance for your kind help
Following the information
tlb name = Currency
tlbfield1=Currencycode
tlbfield2=Currencyname
Private Sub Form_Load()
Dim sql1 As Integer
sql1 = SELECT Currency.[Currencycode] AS Code, Currency.[Currencyname] AS Name FROM [Currency];
DoCmd.RunSQL sql1
Me.listcurcode.RowSource = sql1
Me.listcurcode.Requery
End Sub
I am total green in access specially in VBA world and trying to learn during my free time
I am able to learn to learn how to assign values to LISTBOX, based on already created Query (using Wizard)
Now I am trying to learn, HOW to create the query through VBA and assign to listbox instead of first creating query
What exactly I am trying to learn is upon opening of the my listbox show already existed records (for information)
Thanks in advance for your kind help
Following the information
tlb name = Currency
tlbfield1=Currencycode
tlbfield2=Currencyname
Private Sub Form_Load()
Dim sql1 As Integer
sql1 = SELECT Currency.[Currencycode] AS Code, Currency.[Currencyname] AS Name FROM [Currency];
DoCmd.RunSQL sql1
Me.listcurcode.RowSource = sql1
Me.listcurcode.Requery
End Sub