D
Derek Brown
Hi all
How do I force a form to save after programatically entering data, without
entering the form.
How do I force a form to save after programatically entering data, without
entering the form.
Derek said:Hi all
How do I force a form to save after programatically entering data,
without entering the form.
Derek said:Hi again
Can I use you reply to solve the following
I have an Invoicing form that consists of 1.main form, (customers
details) 2. Subform Invoice details (invoice number delivery address etc. and
3. Sub-subform, Invoice items.(Products prices etc).
The Problem. The form has three tables one for each form linked with
referencial integrety. When a customer calls, the user finds the
customers details. The user usualy tries to skip entering details in
the first subform (2) and tries to enter information straight into
the item subform (3) without entering information into the first
subform (2)causing a gap in the link between the three tables. Is it
possible to automatically enter a value linking the field between (1)
and (2) so that they can go straight to the Item or SuSubform (3)
without causing a referencial integrity error? "Rick Brandt"
Derek said:Thats great Rick
But how do you overcome the problem of wanting a form to open and
show the inner subform if data exists but not if no data is available.
I have tried:
Derek said:Thanks again
Should the code be writen in the first subform or the main form. I
have guessed it was the outer subform but try as i may i cannot get
it to work. I have Main Form, SubForm and SubsubForm
Derek said:Hi Rick
Private Sub Form_Current()
Me.ItemForm.Visible = Not Me.NewRecord
End Sub
Private Sub Form_AfterInsert()
Me.ItemForm.Visible = True
End Sub
Derek said:Hi Rick
Thought I would let you know that I have solved the problem (with
your help) Although I wish I understood what I did. I put this in the
lower sub or the inside sub
Works great but why would Me.Visible Work in the inner sub when
Me.ItemForm.Visible would not in the higher subform?
Derek said:Hi Rick
Perhaps some of the newsgroup postings are not comming through at the
correct time. I sent a post before the last one that answered your
post here it is again.
Hi Rick
I have a form called ItemForm that i inserted into the outer Subform
which is called Invoice Form. Is this not the control? In the Module
I have code that is writen in the ItemForm and the title of the code
(or the container?) is Form_ItemForm. So I assume that this is the
control name. Is this correct?
Does that help?
Derek said:Hi Rick
You were correct that code did not allow data entry. This does but
still seems a crude way to do it:
Into lowest subform I put:
Private Sub Form_Current()
If IsNull(Forms!MainForm!InvoiceForm.Form!AccountCode) = False Then
Me.Visible = True
Else
Me.Visible = False
End If
End Sub