Show all records

StefanSch

Registered User.
Local time
Today, 06:41
Joined
Jan 18, 2003
Messages
136
Hi

I have got a subform which works fine in general.

However, one current disadvantage is the following:

when I press the {enter} key or the {tab} key, Access often doesn't show anymore all records. It then goes to the next record and cuts some records above.

Do you have any ideas how to make sure that all records are shown in the subform (the subform can include only up to 10 records, so this should not be the problem).

For your information. I am working with Access 97.

Regards, Stefan
 
I am not exactly sure what your problem is but Access will show all the records in the subform that are related to the record selelect in the main form. I am not sure how you are using the Tab and Enter key so I can't respond to that...

Jack
 
The issue is the following:

When I save a new record, the currently focused record moves up to the top of the subform space. The records before the currently focused record cannot be viewed anymore. This can then be undone by pressing twice {pgup}.

By code I could do the following:
After pressing the save button I could add the code:
SendKeys "{pgup}"
SendKeys "{pgup}"
I tried. It works. But the user can see that. It is not nice.

Do you have any ideas?

Stefan
 
Please help me. I am lost on this.

Any comments and ideas are appreciated.
 
Do you have a command button to save the record? If so, what code are you using to save the record? Are you changing the Data Entry property with code? What is the setting of the Allow Additions property? Is the form in datasheet view or continuous forms?

The problem resides in how you are displaying your information. I can only guess at what may be going on with your form. Try making a new subform, in datasheet view, using the Wizrard and see if you have the same problem.

Jack
 
Hello

Yes I have a SaveCommandButton with the following code:

___________________________

Private Sub cmdSave_Click()
'will return:
' -1 -> record saved
' 0 -> not saved, but go on
' 1 -> not saved, cancel
Dim strMsg As String, ctl As Control
Select Case MsgBox("Do you want to save?", vbQuestion + vbYesNoCancel, "Save")
Case vbYes
If Not checkDataValidation Then
If Len(Trim(Nz(Article1))) > 0 Then
strMsg = "Information not complete. Please check."
Set ctl = Article1
ElseIf Len(Trim(Nz(Article2))) > 0 Then
strMsg = "Information not complete. Please check"
Set ctl = Article2
Else
strMsg = "Information not complete. Please check."
Set ctl = Article3
End If
DataInvalid_Info strMsg, ctl
Exit Sub
Else
mfOverride_LeavingRecord_Msg = True
DoCmd.RunCommand acCmdSaveRecord
cmdNewCurrency.Enabled = True
Forms![frmArticle]![subfrmDetails].Form.Refresh
End If
End Select
cmdNewArticle.Enabled = True
End Sub

___________________________


For your information. My subform is a continous form. AllowAddition is set to yes.

Thanks. Stefan
 
I don't know where your cursor ends up but if it is in a control on the last record in the subform then code like this will move the cursor 'back' showing your last record and the 4 records that preceded it:

DoCmd.GoToRecord, , acPrevious, 4

hth,
Jack
 
Thanks for your posting.

Unfortunately, your code has not resolved the problem. It's still there.

Do you know why the subform is "cut" after the code above has been run through?

What I would like is to avoid the cutting instead of reparing the cutting.

Does anyone have any idea on this annoying problem?

Stefan.
 
for your information.

This problem does not appear in Access 2000. It appears only in Access 97. Maybe this is a help what could cause this problem to appear.

Stefan.
 
Does anyone have any ideas. I am lost.

Thanks a lot. Stefan
 
I am sorry but I am out of ideas. You might want to repost your question so others will see it and maybe someone will have an answer for you.

Jack
 

Users who are viewing this thread

Back
Top Bottom