Rowsource not updating

From the application developer's perspective, the database is protected from typos and other erroneous data.However, on occasion, you may need a list control that's a bit more flexible, allowing users to update the control's list.In this case, there are four list items and two columns, so Access displays two values in each row.If you changed the Column Count property to 1, Access would display four items in a single column.You'll be able to ask any tech support questions, or chat with the community and help others.Dear reader, The syntax for the VBA code to change the Row Source of a Form is: Forms! Row Source = "Table Or Query Name" Bu now the syntax to change the Row Source of a Sub Form: Forms! For example, where the related table has more than one foreign key of the right data type to choose from (regardless of whether the names match or not), and you are using queries as the source. Access will reset the Link Master Fields and Link Child Fields property of the subform control. If it gets it wrong, the subform may show all record (not just the related ones), no records at all, or the wrong records.In a working database, you'd probably hide the first column.With a value list control, the Column Count property forces additional columns, accordingly.

This choice is easy for users — they simply enter the item into the control's text box component. You have to program the control to accept non-list items.Then you must use a dynamic range as rowsource in the Initialize procedure.In the following example we find the number of rows down to the first empty cell and use it as rowsource.Instead of defining a rowsource in the spreadsheet you can add the items one by one with the Add Item method. Add Item "Line 4" End With Exit Sub Error Handle: Msg Box Err.You can do it manually or with a loop, where you read from a range, a collection or the like. Description End Sub You can also loop through a range and use the Add Item method.Adding or deleting items from a combo box isn't difficult.

380

Leave a Reply