X
xgamer
Hi, the summary of my problem is the following: I'm having trouble opening a
form, with its subform having a new entry already created and data from the
main form put in it
Let me give you more table details:
tblClient: Client# and data, tblOrder: Order# and data , tblOrderProduct:
Products associated with that order
Form Details:
Main form frmBilling: Contains client information when it opens, it got to
display previously chosen client's data
frmBilling's Subform frmOrder: When opened, automatically add a new order
entry with the Client # in tblOrder.NumClient and a default order# when
frmBilling opens
frmOrder's Subform frmOrderItem: Allows to manually add one or more product
in that order with the frmOrderItem.NumOrder being the parent's form order
number
The way it currently works: frmBilling is opened after a search for a client
in another form. I pass the NumClient as openargs, and in the form load I
filter the frmBilling so that I have the correct client info displayed and
requery the subform. In frmOrder I assigned a function that returns the next
order number in the DefaultValue property if my NumOrder textbox.
The problem: When the frmBilling is opened, the subformOrder.txtNumOrder
displays the good order # but a new entry wasnt yet created (as if the value
is in txtNumOrder rather than in the NumOrder table field. Then if I try to
add a new product in the order, the subfrmOrderItem.NumOrder will not contain
the order# because no new order exist.
If I enter some data in the order before adding an item, a new order entry
is created and from now on, new items contains the order#
What I need: To be able to open the frmBilling displaying only one client,
no navigation or adding clients. frmOrder must have a new entry linked to my
client and with the new order# being provided by me thru a function call.
frmOrderItem works ok only if a new order exist so I believe there are no
problems there.
Thank you very much for your help!
form, with its subform having a new entry already created and data from the
main form put in it
Let me give you more table details:
tblClient: Client# and data, tblOrder: Order# and data , tblOrderProduct:
Products associated with that order
Form Details:
Main form frmBilling: Contains client information when it opens, it got to
display previously chosen client's data
frmBilling's Subform frmOrder: When opened, automatically add a new order
entry with the Client # in tblOrder.NumClient and a default order# when
frmBilling opens
frmOrder's Subform frmOrderItem: Allows to manually add one or more product
in that order with the frmOrderItem.NumOrder being the parent's form order
number
The way it currently works: frmBilling is opened after a search for a client
in another form. I pass the NumClient as openargs, and in the form load I
filter the frmBilling so that I have the correct client info displayed and
requery the subform. In frmOrder I assigned a function that returns the next
order number in the DefaultValue property if my NumOrder textbox.
The problem: When the frmBilling is opened, the subformOrder.txtNumOrder
displays the good order # but a new entry wasnt yet created (as if the value
is in txtNumOrder rather than in the NumOrder table field. Then if I try to
add a new product in the order, the subfrmOrderItem.NumOrder will not contain
the order# because no new order exist.
If I enter some data in the order before adding an item, a new order entry
is created and from now on, new items contains the order#
What I need: To be able to open the frmBilling displaying only one client,
no navigation or adding clients. frmOrder must have a new entry linked to my
client and with the new order# being provided by me thru a function call.
frmOrderItem works ok only if a new order exist so I believe there are no
problems there.
Thank you very much for your help!