Sunday 15 March 2015

How to display more data from the database (access) in VBA? -


What is the matter after selecting a name from the combo box in the list box is to display all the employees of the selected company . And now my problem, always shows only 2 employees of the company selected in a list box, for the following part of the code responsible for displaying, I am new to VBA and, of course, my question is that only two employees Why are you

Process-click on the company selected from the combo box:

  Recorcetset as a slow record in the form of a slow DB database as the dim query string Dim Strikby 30 String Dim I In Integr Strommy 30 = M. Combi 30. Value "Combobox Query =" SELECT [Employee]. [First Name], [Employee]. [Name] From "& amp; _ "[Employees] where [Employee]. [Company] = '' & amp; Me.Combi30 set db = CurrentDb () Record to record = db.OpenRecordset (query) RecordSt.MoveFirst for I = 0 to record. Redevelopment list list contact addItem (RecordSt.Fields ("first name"). Price & amp; "" & ValueStat.Fields ("name"). Value) RecordSt.MoveNext Next I    

  stroky 30 = m. combe 30.value "combobox query =" selection [employee]. [First name], [employee]. [Name] to "& amp; _" [employees] where [employee] [Company] = '' & amp; Strakomy 30 & amp; nbsp; "'"    

No comments:

Post a Comment