using additional form in continuous form

G

Guest

I have a main form frmCustomers and a continuous subform Sub_frmCustomers
linked to a table. To save a space on the continuous form for notes entries
I'm using the button covered the txtNotes field on the continuous form to
open the frmNotes for the entries.

frmNotes:
Private Sub Form_Load()

Me.txtNotes.EnterKeyBehavior = True

Me.txtNotes.Requery
Me.txtNotes = Forms![frmCustomers]!Sub_frmCustomers!Notes

Me.cmdClose.Requery
Me.cmdClose.SetFocus
End Sub

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

Forms![frmCustomers]!Sub_frmCustomers!Notes = Me.txtNotes

DoCmd.Close acForm, "frmNotes"

Exit_cmdClose_Click:
Exit Sub

Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click

End Sub
Please, look at the code whether it's Ok as I sent the DB via e-mail and the
user's saying that he cannot save the notes.
 
M

Marshall Barton

Alex said:
I have a main form frmCustomers and a continuous subform Sub_frmCustomers
linked to a table. To save a space on the continuous form for notes entries
I'm using the button covered the txtNotes field on the continuous form to
open the frmNotes for the entries.

frmNotes:
Private Sub Form_Load()

Me.txtNotes.EnterKeyBehavior = True

Me.txtNotes.Requery
Me.txtNotes = Forms![frmCustomers]!Sub_frmCustomers!Notes

Me.cmdClose.Requery
Me.cmdClose.SetFocus
End Sub

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

Forms![frmCustomers]!Sub_frmCustomers!Notes = Me.txtNotes

DoCmd.Close acForm, "frmNotes"


Aside from the line Me.cmdClose.Requery not having any
purpose, I don't see anything wrong. Are you sure that the
txtNotes text box in the subform is bound to the field in
the table? How does this situation behave in your test
scenario?
 
G

Guest

Thanks a lot, Marshal for your reply. On my machine it's working good. At
least you confirmed that the code should be fine. I'll try to clarify it with
the user one more time.

The purpose of the cmdClose button focusing is to go out from the text
window as it's focused as a default and all text is shadowed with black
background.

Marshall Barton said:
Alex said:
I have a main form frmCustomers and a continuous subform Sub_frmCustomers
linked to a table. To save a space on the continuous form for notes entries
I'm using the button covered the txtNotes field on the continuous form to
open the frmNotes for the entries.

frmNotes:
Private Sub Form_Load()

Me.txtNotes.EnterKeyBehavior = True

Me.txtNotes.Requery
Me.txtNotes = Forms![frmCustomers]!Sub_frmCustomers!Notes

Me.cmdClose.Requery
Me.cmdClose.SetFocus
End Sub

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

Forms![frmCustomers]!Sub_frmCustomers!Notes = Me.txtNotes

DoCmd.Close acForm, "frmNotes"


Aside from the line Me.cmdClose.Requery not having any
purpose, I don't see anything wrong. Are you sure that the
txtNotes text box in the subform is bound to the field in
the table? How does this situation behave in your test
scenario?
 
M

Marshall Barton

Working on one machine and not on another is usually a
references problem. Either a missing reference or the right
references to the wrong versions. Double check these
carefully on both machines..

I wasn't questioning the SetFocus, it the Requery that
doesn't make sense to me.
--
Marsh
MVP [MS Access]

Thanks a lot, Marshal for your reply. On my machine it's working good. At
least you confirmed that the code should be fine. I'll try to clarify it with
the user one more time.

The purpose of the cmdClose button focusing is to go out from the text
window as it's focused as a default and all text is shadowed with black
background.

Alex said:
I have a main form frmCustomers and a continuous subform Sub_frmCustomers
linked to a table. To save a space on the continuous form for notes entries
I'm using the button covered the txtNotes field on the continuous form to
open the frmNotes for the entries.

frmNotes:
Private Sub Form_Load()

Me.txtNotes.EnterKeyBehavior = True

Me.txtNotes.Requery
Me.txtNotes = Forms![frmCustomers]!Sub_frmCustomers!Notes

Me.cmdClose.Requery
Me.cmdClose.SetFocus
End Sub

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

Forms![frmCustomers]!Sub_frmCustomers!Notes = Me.txtNotes

DoCmd.Close acForm, "frmNotes"
Marshall Barton said:
Aside from the line Me.cmdClose.Requery not having any
purpose, I don't see anything wrong. Are you sure that the
txtNotes text box in the subform is bound to the field in
the table? How does this situation behave in your test
scenario?
 
G

Guest

Thank you very much, Marshall.
I've clarified the cause of this. The user is Russian and is typing the text
in Russian. This is why VB cannot recognize it and the text cannot be saved.
If I'm typing anything in English it's working well.

Is there anything to fix it (to allow VB to recognize the Russian text)?

Thanks

Marshall Barton said:
Working on one machine and not on another is usually a
references problem. Either a missing reference or the right
references to the wrong versions. Double check these
carefully on both machines..

I wasn't questioning the SetFocus, it the Requery that
doesn't make sense to me.
--
Marsh
MVP [MS Access]

Thanks a lot, Marshal for your reply. On my machine it's working good. At
least you confirmed that the code should be fine. I'll try to clarify it with
the user one more time.

The purpose of the cmdClose button focusing is to go out from the text
window as it's focused as a default and all text is shadowed with black
background.

Alex wrote:
I have a main form frmCustomers and a continuous subform Sub_frmCustomers
linked to a table. To save a space on the continuous form for notes entries
I'm using the button covered the txtNotes field on the continuous form to
open the frmNotes for the entries.

frmNotes:
Private Sub Form_Load()

Me.txtNotes.EnterKeyBehavior = True

Me.txtNotes.Requery
Me.txtNotes = Forms![frmCustomers]!Sub_frmCustomers!Notes

Me.cmdClose.Requery
Me.cmdClose.SetFocus
End Sub

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

Forms![frmCustomers]!Sub_frmCustomers!Notes = Me.txtNotes

DoCmd.Close acForm, "frmNotes"
Marshall Barton said:
Aside from the line Me.cmdClose.Requery not having any
purpose, I don't see anything wrong. Are you sure that the
txtNotes text box in the subform is bound to the field in
the table? How does this situation behave in your test
scenario?
 
M

Marshall Barton

Oh my! I never would have thought of that. I suspect that
dealing with this will require some mechanism(?) that
translates between the two languages. I have no idea what
can do that, but maybe(?) this might contain some insights:
http://www.trigeminal.com/website.asp?1033
especially
http://www.i18nwithvb.com/
--
Marsh
MVP [MS Access]

Thank you very much, Marshall.
I've clarified the cause of this. The user is Russian and is typing the text
in Russian. This is why VB cannot recognize it and the text cannot be saved.
If I'm typing anything in English it's working well.

Is there anything to fix it (to allow VB to recognize the Russian text)?


Marshall Barton said:
Working on one machine and not on another is usually a
references problem. Either a missing reference or the right
references to the wrong versions. Double check these
carefully on both machines..

I wasn't questioning the SetFocus, it the Requery that
doesn't make sense to me.

Thanks a lot, Marshal for your reply. On my machine it's working good. At
least you confirmed that the code should be fine. I'll try to clarify it with
the user one more time.

The purpose of the cmdClose button focusing is to go out from the text
window as it's focused as a default and all text is shadowed with black
background.


Alex wrote:
I have a main form frmCustomers and a continuous subform Sub_frmCustomers
linked to a table. To save a space on the continuous form for notes entries
I'm using the button covered the txtNotes field on the continuous form to
open the frmNotes for the entries.

frmNotes:
Private Sub Form_Load()

Me.txtNotes.EnterKeyBehavior = True

Me.txtNotes.Requery
Me.txtNotes = Forms![frmCustomers]!Sub_frmCustomers!Notes

Me.cmdClose.Requery
Me.cmdClose.SetFocus
End Sub

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

Forms![frmCustomers]!Sub_frmCustomers!Notes = Me.txtNotes

DoCmd.Close acForm, "frmNotes"


:
Aside from the line Me.cmdClose.Requery not having any
purpose, I don't see anything wrong. Are you sure that the
txtNotes text box in the subform is bound to the field in
the table? How does this situation behave in your test
scenario?
 
G

Guest

Thank you very much, Marshall again.
I'll try to figure it out.

Marshall Barton said:
Oh my! I never would have thought of that. I suspect that
dealing with this will require some mechanism(?) that
translates between the two languages. I have no idea what
can do that, but maybe(?) this might contain some insights:
http://www.trigeminal.com/website.asp?1033
especially
http://www.i18nwithvb.com/
--
Marsh
MVP [MS Access]

Thank you very much, Marshall.
I've clarified the cause of this. The user is Russian and is typing the text
in Russian. This is why VB cannot recognize it and the text cannot be saved.
If I'm typing anything in English it's working well.

Is there anything to fix it (to allow VB to recognize the Russian text)?


Marshall Barton said:
Working on one machine and not on another is usually a
references problem. Either a missing reference or the right
references to the wrong versions. Double check these
carefully on both machines..

I wasn't questioning the SetFocus, it the Requery that
doesn't make sense to me.


Alex wrote:
Thanks a lot, Marshal for your reply. On my machine it's working good. At
least you confirmed that the code should be fine. I'll try to clarify it with
the user one more time.

The purpose of the cmdClose button focusing is to go out from the text
window as it's focused as a default and all text is shadowed with black
background.


Alex wrote:
I have a main form frmCustomers and a continuous subform Sub_frmCustomers
linked to a table. To save a space on the continuous form for notes entries
I'm using the button covered the txtNotes field on the continuous form to
open the frmNotes for the entries.

frmNotes:
Private Sub Form_Load()

Me.txtNotes.EnterKeyBehavior = True

Me.txtNotes.Requery
Me.txtNotes = Forms![frmCustomers]!Sub_frmCustomers!Notes

Me.cmdClose.Requery
Me.cmdClose.SetFocus
End Sub

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

Forms![frmCustomers]!Sub_frmCustomers!Notes = Me.txtNotes

DoCmd.Close acForm, "frmNotes"


:
Aside from the line Me.cmdClose.Requery not having any
purpose, I don't see anything wrong. Are you sure that the
txtNotes text box in the subform is bound to the field in
the table? How does this situation behave in your test
scenario?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top