Getting Unwanted Additional Records In Form Details

  • Thread starter Thread starter tsluu
  • Start date Start date
T

tsluu

On form load I am setting form recordsource to a SQL statement. My problem is
when I update a rowsource of a listbox in the form details, an additional
record appears in the form details. That is highly unusual since based on the
SQL statement, there should be no records. There are however several records
in the listbox. Could there be a linkage that caused the extra records in the
form details?
 
On form load I am setting form recordsource to a SQL statement. My problem is
when I update a rowsource of a listbox in the form details, an additional
record appears in the form details. That is highly unusual since based on the
SQL statement, there should be no records. There are however several records
in the listbox. Could there be a linkage that caused the extra records in the
form details?

A subform will display a blank, empty, not-yet-existant new record for an
updateable form. Is that what you're seeing?

If not, please post the SQL statement and indicate what's appearing and when.
 
The not-yet-existent new record for an updateable form is fine but when the
code runs the indicated line below, an extra record appears. So I am seeing
two records.

With Me.cboProject
.BoundColumn = 1
.ColumnCount = 3
.ColumnWidths = "800;1500;0"
.RowSource = ssql
.ListWidth = 2300
.ListRows = 5
---> .Value = .Column(0, 0)
End With
 
The not-yet-existent new record for an updateable form is fine but when the
code runs the indicated line below, an extra record appears. So I am seeing
two records.

With Me.cboProject
.BoundColumn = 1
.ColumnCount = 3
.ColumnWidths = "800;1500;0"
.RowSource = ssql
.ListWidth = 2300
.ListRows = 5
---> .Value = .Column(0, 0)
End With

Well... yes. You're dirtying the record by setting the bound combo's Value; so
you now have the newly entered, active record and a "new new" record. It's
doing precisely what you're asking it to do.
 
Back
Top