> Just for clarification, would I then type:
>
[quoted text clipped - 4 lines]
> other fileds such as Name, Address etc.. for which, I assume
> the same process would apply).
if subfrmCustomer is both the name of the subform control and
the name of the form in the control, yes. If the two are
different, use the name of the control, not the form
>> > Can someone tell me how to identify a field on a subform
>> > using code? I am trying to create a routine that, when a
[quoted text clipped - 19 lines]
>>
>> me!child1.form![fieldname]

Signature
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
Zoltar54 - 05 Jul 2007 18:14 GMT
It seems to be working however when I try to enter a new customer name into
the subform I am having to problems.
1) I reveive a warning stating that states:
You can't assign a value to this object because
The Object may be a control on a read-only form
The object may be on a form that is open in design view
The value may be too large for this field
None of these are true as far as I can tell.
2) Once I have entered a new customer (despite the error above I am able to)
I cannot get the mainform to requery the Customer list and use the newly
added customer to the current file.
Below is the code I have tried to use:
Private Sub CustomerID_NotInList(NewData As String, Response As Integer)
Response = acDataErrContinue
If MsgBox("The party you have entered is not in the list. Would you like to
add it?", vbOKCancel) = vbOK Then
Me.customerID.Undo
Me.customerID.Value = Null
Me.subfrmcustomer.SetFocus
Me.subfrmcustomer.Form.DataEntry = True
End If
End Sub
Any suggestions?
> > Just for clarification, would I then type:
> >
[quoted text clipped - 32 lines]
> >>
> >> me!child1.form![fieldname]
Bob Quintal - 05 Jul 2007 21:45 GMT
> It seems to be working however when I try to enter a new
> customer name into the subform I am having to problems.
[quoted text clipped - 28 lines]
>
> Any suggestions?
I'm not sure about your error message.
If you pick an existing customer from the list do you get any
error message?
me.customer.undo and me.customerid,value = null seem to be
redundant. the Response = acDataErrContinue should take care of
that automatically.
I usually popup a small independent form to capture the data if
there are multiple fields to input, followed by setting the
Response to AcErrDataAdded which automatically requeries the
combobox.
see http://msdn2.microsoft.com/en-us/library/aa211431
(office.11).aspx
>> > Just for clarification, would I then type:
>> >
[quoted text clipped - 34 lines]
>> >>
>> >> me!child1.form![fieldname]

Signature
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com