To Ken Snell

R

Russ

Ken:

From a post dated October 22, 2003 (Copy of text bellow)

I keep getting the error: "Method Or Data Member Not
Found" after I plugged the code as you stated in the sub-
form.

Since I'm rather new at this, can you assist?

Thanks,


-----Original Message-----
In your code, after you load the subform, put this code snippet (change
names to your actual names; code not tested) -- note that this code assumes
that you're running code in the subform; if it's in the main form, it'll
need to be a bit different:

If Len(Me.cbo1.Value & "") <> 0 And Len(Me.cbo2.Value) <> 0 Then _
Me.Recordset.AddNew

If the code is running in the main form, then the code snippet would be
similar to this:

If Len(Me.Subform!cbo1.Value & "") <> 0 And _
Len(Me.Subform!cbo2.Value) <> 0 Then _
Me.Subform.Form.Recordset.AddNew

(where Subform is the name of the subform control [ the control on the main
form that holds the subform ] ).


--
Ken Snell
<MS ACCESS MVP>

I have an application which allows two of four shifts each
to enter data based on which shift they belong to, day or
night.
'
There are two drop down boxes allowing the imput of the
shift value represented at the time. cbo1 = DayShift and
cbo2 = NightShift

The first shift begins at 7:00 AM with the second shift
beginning at 7:00PM. Each shift consists of 12 hours. The
application has a main form that swaps out sub-forms for
each aspect of the shift's assignments.

Currently I have the sub-forms opening in the "OnLoad"
event to acLastRec when they are called/swapped. What I'd
like to do is have the sub-form look to see if either or
both of the shift (cbo1 or cbo2) controls have a value or
not, if cbo1 has a value and cbo2 does not, open to
acLastRec. If both cbo1 and cbo2 already have a value do
not open to acLastRec, open to acNewRec, which would be a
new day/date since both shifts have already completed data
entry for the previous day/date and it's now a new day and
shift.

Is this possible? How???

Thanks,...
 
K

Ken Snell

see my reply/question in the original thread.

--
Ken Snell
<MS ACCESS MVP>

Russ said:
Ken:

From a post dated October 22, 2003 (Copy of text bellow)

I keep getting the error: "Method Or Data Member Not
Found" after I plugged the code as you stated in the sub-
form.

Since I'm rather new at this, can you assist?

Thanks,


-----Original Message-----
In your code, after you load the subform, put this code snippet (change
names to your actual names; code not tested) -- note that this code assumes
that you're running code in the subform; if it's in the main form, it'll
need to be a bit different:

If Len(Me.cbo1.Value & "") <> 0 And Len(Me.cbo2.Value) <> 0 Then _
Me.Recordset.AddNew

If the code is running in the main form, then the code snippet would be
similar to this:

If Len(Me.Subform!cbo1.Value & "") <> 0 And _
Len(Me.Subform!cbo2.Value) <> 0 Then _
Me.Subform.Form.Recordset.AddNew

(where Subform is the name of the subform control [ the control on the main
form that holds the subform ] ).


--
Ken Snell
<MS ACCESS MVP>

I have an application which allows two of four shifts each
to enter data based on which shift they belong to, day or
night.
'
There are two drop down boxes allowing the imput of the
shift value represented at the time. cbo1 = DayShift and
cbo2 = NightShift

The first shift begins at 7:00 AM with the second shift
beginning at 7:00PM. Each shift consists of 12 hours. The
application has a main form that swaps out sub-forms for
each aspect of the shift's assignments.

Currently I have the sub-forms opening in the "OnLoad"
event to acLastRec when they are called/swapped. What I'd
like to do is have the sub-form look to see if either or
both of the shift (cbo1 or cbo2) controls have a value or
not, if cbo1 has a value and cbo2 does not, open to
acLastRec. If both cbo1 and cbo2 already have a value do
not open to acLastRec, open to acNewRec, which would be a
new day/date since both shifts have already completed data
entry for the previous day/date and it's now a new day and
shift.

Is this possible? How???

Thanks,...
 
R

Russ

Ken:

Both, at times at Main Form's module level, at others at
the Sub-Form module level.

Thanks,...

-----Original Message-----
see my reply/question in the original thread.

--
Ken Snell
<MS ACCESS MVP>

Ken:

From a post dated October 22, 2003 (Copy of text bellow)

I keep getting the error: "Method Or Data Member Not
Found" after I plugged the code as you stated in the sub-
form.

Since I'm rather new at this, can you assist?

Thanks,


that
this code assumes
0 Then _
Me.Recordset.AddNew

If the code is running in the main form, then the code snippet would be
similar to this:

If Len(Me.Subform!cbo1.Value & "") <> 0 And _
Len(Me.Subform!cbo2.Value) <> 0 Then _
Me.Subform.Form.Recordset.AddNew

(where Subform is the name of the subform control [ the control on the main
form that holds the subform ] ).


--
Ken Snell
<MS ACCESS MVP>

I have an application which allows two of four shifts each
to enter data based on which shift they belong to,
day
or
night.
'
There are two drop down boxes allowing the imput of the
shift value represented at the time. cbo1 = DayShift and
cbo2 = NightShift

The first shift begins at 7:00 AM with the second shift
beginning at 7:00PM. Each shift consists of 12 hours. The
application has a main form that swaps out sub-forms for
each aspect of the shift's assignments.

Currently I have the sub-forms opening in the "OnLoad"
event to acLastRec when they are called/swapped. What I'd
like to do is have the sub-form look to see if either or
both of the shift (cbo1 or cbo2) controls have a
value
or
not, if cbo1 has a value and cbo2 does not, open to
acLastRec. If both cbo1 and cbo2 already have a value do
not open to acLastRec, open to acNewRec, which would
be
a
new day/date since both shifts have already completed data
entry for the previous day/date and it's now a new
day
and
shift.

Is this possible? How???

Thanks,...


.
 

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