V
vincentt via AccessMonster.com
Wow... I have try out a lot of stuff and finally give up and ask for advices
from you all....
In the very beginining, i wrote the code as follow:
Private Sub btn_printold_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "student"
stLinkCriteria = "[sid]=" & "'" & Me![sid] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Form_student.AllowEdits = False
Form_student.AllowAdditions = False
Form_student.AllowDeletions = False
Form_order.AllowEdits = True
Form_order.AllowAdditions = True
Form_order.AllowDeletions = False
Form_receipt.AllowEdits = True
Form_receipt.AllowAdditions = True
Form_receipt.AllowDeletions = False
Form_student!tab_orderinfo.SetFocus
DoCmd.Maximize
DoCmd.Close acForm, Me.Name
It works fine, after I almost finished, I try it back and it failed. The
subform Order could not set, also the subform receipt inside the subform
order. So I search around and changed the inner code for Order and Receipt:
Forms!order.Form.AllowEdits = True
Forms!order.AllowAdditions = True
Forms!order.AllowDeletions = False
Forms!receipt.AllowEdits = True
Forms!receipt.AllowAdditions = True
Forms!receipt.AllowDeletions = False
or
Forms!student!order.form.AllowEdits = True
Forms!student!order.form.AllowAdditions = True
Forms!student!order.form.AllowDeletions = False ...................
All no luck, either comes out Invalid property Form/Report, or cannot find
the form "Order". For sure, I didn't change the name at all, and I try to
export all the a new blank database, the same.
Please help!!! My brain is going to bomb......................................
................................. Thanks! (anything unclear, do ask)
--
I am so new to Access... questions questions and questions...
Thanks always!
Message posted via AccessMonster.com
from you all....
In the very beginining, i wrote the code as follow:
Private Sub btn_printold_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "student"
stLinkCriteria = "[sid]=" & "'" & Me![sid] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Form_student.AllowEdits = False
Form_student.AllowAdditions = False
Form_student.AllowDeletions = False
Form_order.AllowEdits = True
Form_order.AllowAdditions = True
Form_order.AllowDeletions = False
Form_receipt.AllowEdits = True
Form_receipt.AllowAdditions = True
Form_receipt.AllowDeletions = False
Form_student!tab_orderinfo.SetFocus
DoCmd.Maximize
DoCmd.Close acForm, Me.Name
It works fine, after I almost finished, I try it back and it failed. The
subform Order could not set, also the subform receipt inside the subform
order. So I search around and changed the inner code for Order and Receipt:
Forms!order.Form.AllowEdits = True
Forms!order.AllowAdditions = True
Forms!order.AllowDeletions = False
Forms!receipt.AllowEdits = True
Forms!receipt.AllowAdditions = True
Forms!receipt.AllowDeletions = False
or
Forms!student!order.form.AllowEdits = True
Forms!student!order.form.AllowAdditions = True
Forms!student!order.form.AllowDeletions = False ...................
All no luck, either comes out Invalid property Form/Report, or cannot find
the form "Order". For sure, I didn't change the name at all, and I try to
export all the a new blank database, the same.
Please help!!! My brain is going to bomb......................................
................................. Thanks! (anything unclear, do ask)
--
I am so new to Access... questions questions and questions...
Thanks always!
Message posted via AccessMonster.com