Question on Variables

LOL never mind Im a moron

I set it for on form load, and forgot to close my form and load it again :) my bad lol

Thanks for the help :)
 
Where's this listbox pointing to?

And remember, I mentioned that you should use Listbox instead of Control to declare the ctlListBox object.
 
it points to 1 field in my tables and ya thats the next part I need to work out how to do what you said with the listbox
 
ok I think I got it all set up right... heres how it looks

Code:
Option Compare Database
Option Explicit

Private ctlListBox As ListBox
Private StrTextName As String
Private StrRecordTblF1 As String
Private StrRecordTbl As String
Private StrRecordTblID As String



Private Sub Form_Load()

    ' Edit the Lines below
    
    Set ctlListBox = Forms!frmPublisherList!publistList     'Point this at ListBox
    StrTextName = "Publisher"                               'Edit this to whatever Name you are editing
    StrRecordTbl = "tblpublishers"                          'Table your editing
    StrRecordTblID = "PublisherID_PK"                       'Table Primary ID Field Name
    StrRecordTblF1 = "PublisherName"                        'Main Table Field your Editing
    
    ' Stop Editing

End Sub


Everything seems to be functional so thats good
 
This is what Im doing if you were curious... the 2 forms that end in list are functional, the other is definitely not yet.

My code probably looks like it was written by an amateur, thats because it has been :)

But Im learning as I go and thats whats important
 

Attachments

Users who are viewing this thread

Back
Top Bottom