T
TBernard
I have a very strange problem with a continous subform.
The recordsource for the subform is just 1 table, which
makes this error that much stranger.
In SQL to get the autonumber (my ID field for the subform)
to populate you must leave the current record (opposed to
MS Access where as soon as you type on a new record the
autonumber field populates). Well on this continous
subform, I have a command button that opens up a pop-up
form that shows data related to the current record on the
subform. So I need this autonumber field to populate for
the pop-up form to work correctly. When I used the
following code:
Me.Requery
It sends the users back to the 1st record in the subform.
So if they are entering 20 records into the subform, after
the Me.Requery code, they would have to scroll back down
to get to the correct record.
I then tried this code:
If Me.Dirty Then
Me.Dirty = False
End If
Which worked great, but for certain records only I get
this following weird error:
Runtime error '30014':
The data was added to the database but the data won't be
displayed in the form because it doesn't satisfy the
criteria in the underlying record source.
I then click "Debug" and it goes to the code: Me.Dirty =
False.
If I continue to run the form, then the record appears
blank, but if I scroll to one record on the main form
back, and then come back to the current record on the main
form the subform record that caused this error is properly
populated. And everything saves correctly in the table.
I am at a loss for where to go, so if anyone has any ideas
it would be greatly appreciated.
Thank you,
TBernard
The recordsource for the subform is just 1 table, which
makes this error that much stranger.
In SQL to get the autonumber (my ID field for the subform)
to populate you must leave the current record (opposed to
MS Access where as soon as you type on a new record the
autonumber field populates). Well on this continous
subform, I have a command button that opens up a pop-up
form that shows data related to the current record on the
subform. So I need this autonumber field to populate for
the pop-up form to work correctly. When I used the
following code:
Me.Requery
It sends the users back to the 1st record in the subform.
So if they are entering 20 records into the subform, after
the Me.Requery code, they would have to scroll back down
to get to the correct record.
I then tried this code:
If Me.Dirty Then
Me.Dirty = False
End If
Which worked great, but for certain records only I get
this following weird error:
Runtime error '30014':
The data was added to the database but the data won't be
displayed in the form because it doesn't satisfy the
criteria in the underlying record source.
I then click "Debug" and it goes to the code: Me.Dirty =
False.
If I continue to run the form, then the record appears
blank, but if I scroll to one record on the main form
back, and then come back to the current record on the main
form the subform record that caused this error is properly
populated. And everything saves correctly in the table.
I am at a loss for where to go, so if anyone has any ideas
it would be greatly appreciated.
Thank you,
TBernard