Hi,
I have an odd problem, to do with a new record on a form using autonumber.
Simply put I have two listboxes:
A selection from one is inserted into a table via a command button and SQL query.
I use a value in a text box (record number) which I tie in with the SQL query to update my database.
My other listbox is used to display values from my updated table.
This is requeryed after my SQL insert.
This all works fine...... until I enter a new record.
The listbox just doesn't display anything.
I thought at first it could be because the new number (autonumber) on the record might not be defined at first, but it is, as my table is updated with the new entrie/s. The problem is that even if I force the listbox to requery it shows nothing, but if I flip back and forth through the records the listbox functions correctly.
Am I missing something simple?
Other bits:
Using Access 97.
On form load I populate the listbox.
On form Current I update the listbox.
After my SQL insert I update the listbox.
I don't actually have the sql string in the recordsource property box, I use a subroutine to do this.
Any help?
Cheers,
Bill.
I have an odd problem, to do with a new record on a form using autonumber.
Simply put I have two listboxes:
A selection from one is inserted into a table via a command button and SQL query.
I use a value in a text box (record number) which I tie in with the SQL query to update my database.
My other listbox is used to display values from my updated table.
This is requeryed after my SQL insert.
This all works fine...... until I enter a new record.
The listbox just doesn't display anything.
I thought at first it could be because the new number (autonumber) on the record might not be defined at first, but it is, as my table is updated with the new entrie/s. The problem is that even if I force the listbox to requery it shows nothing, but if I flip back and forth through the records the listbox functions correctly.
Am I missing something simple?
Other bits:
Using Access 97.
On form load I populate the listbox.
On form Current I update the listbox.
After my SQL insert I update the listbox.
I don't actually have the sql string in the recordsource property box, I use a subroutine to do this.
Any help?
Cheers,
Bill.