tabbing to a subform

  • Thread starter Thread starter Anne
  • Start date Start date
A

Anne

I have a subform, where the user enters the account and the amount. The
amount can be distributed the several jobs. So with the third tab I want the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last field in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
 
I tried all different variations of the below code, but none of them worked.
On the below code I get" Run-time error 438, Object doesn't support this
property or method.
Any other suggestions?
Anne

Ofer said:
Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last field in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
--
In God We Trust - Everything Else We Test


Anne said:
I have a subform, where the user enters the account and the amount. The
amount can be distributed the several jobs. So with the third tab I want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Can you post the code you wrote.
The name of the main form
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


Anne said:
I tried all different variations of the below code, but none of them worked.
On the below code I get" Run-time error 438, Object doesn't support this
property or method.
Any other suggestions?
Anne

Ofer said:
Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last field in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
--
In God We Trust - Everything Else We Test


Anne said:
I have a subform, where the user enters the account and the amount. The
amount can be distributed the several jobs. So with the third tab I want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Main Form: FrmEmployeeReimb1 - single form - based on TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event: Private
subform on current event: me.parent.linkfield1 = me.reimbID I place the
ReimbID onto the main form for the second subform to use - that works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and getting a
total for each employee, where on the second form job numbers are entered,
which could be quite a few or sometimes just one. Later a calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on any row in
the 1st subform and it shows the jobs the amount is being distributed to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Ofer said:
Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


Anne said:
I tried all different variations of the below code, but none of them
worked.
On the below code I get" Run-time error 438, Object doesn't support this
property or method.
Any other suggestions?
Anne

Ofer said:
Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the amount.
The
amount can be distributed the several jobs. So with the third tab I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


Anne said:
Main Form: FrmEmployeeReimb1 - single form - based on TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event: Private
subform on current event: me.parent.linkfield1 = me.reimbID I place the
ReimbID onto the main form for the second subform to use - that works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and getting a
total for each employee, where on the second form job numbers are entered,
which could be quite a few or sometimes just one. Later a calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on any row in
the 1st subform and it shows the jobs the amount is being distributed to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Ofer said:
Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


Anne said:
I tried all different variations of the below code, but none of them
worked.
On the below code I get" Run-time error 438, Object doesn't support this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the amount.
The
amount can be distributed the several jobs. So with the third tab I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Still, I get the same error message
Anne

Ofer said:
On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


Anne said:
Main Form: FrmEmployeeReimb1 - single form - based on TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I place the
ReimbID onto the main form for the second subform to use - that works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on any row
in
the 1st subform and it shows the jobs the amount is being distributed to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Ofer said:
Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none of them
worked.
On the below code I get" Run-time error 438, Object doesn't support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the amount.
The
amount can be distributed the several jobs. So with the third tab I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
After a few more trial and errors, it seems that access cannot find the 2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to be a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part works
correctly. If I go into the query for the jobs, all I have to enter is a job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and here is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Anne said:
Still, I get the same error message
Anne

Ofer said:
On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


Anne said:
Main Form: FrmEmployeeReimb1 - single form - based on TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I place the
ReimbID onto the main form for the second subform to use - that works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on any
row in
the 1st subform and it shows the jobs the amount is being distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none of them
worked.
On the below code I get" Run-time error 438, Object doesn't support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the third tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
I don't think you can go from a txtbox on a subform to a txtbox on another
without the second sub getting focus first.

[Air Code]
txtamount_onexit Forms!mainform!2ndsub.setfocus
Then
Forms!mainform!2ndsub.txtJobNum.setfocus

or

Set tab order of txtJobNum to 0 and tab yes
 
The name of the sub form you gave me, is that the name of the subform itself,
as a form?
The name of the subform need to be the name of the square, subform, inside
the main form.


--
In God We Trust - Everything Else We Test


Anne said:
After a few more trial and errors, it seems that access cannot find the 2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to be a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part works
correctly. If I go into the query for the jobs, all I have to enter is a job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and here is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Anne said:
Still, I get the same error message
Anne

Ofer said:
On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


:

Main Form: FrmEmployeeReimb1 - single form - based on TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I place the
ReimbID onto the main form for the second subform to use - that works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on any
row in
the 1st subform and it shows the jobs the amount is being distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none of them
worked.
On the below code I get" Run-time error 438, Object doesn't support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the third tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Yes 2 subforms on the main form:

Main Form Name: FrmEmployeeReimb1
1st Subform Name:subexpenseReimb
2nd SubForm Name: subexpenseReimbJob

I know, usually I name them as example sFrmExpenseReimb, but I have a few
trial forms already there that I ran out of names.
Anne

Ofer said:
The name of the sub form you gave me, is that the name of the subform
itself,
as a form?
The name of the subform need to be the name of the square, subform, inside
the main form.


--
In God We Trust - Everything Else We Test


Anne said:
After a few more trial and errors, it seems that access cannot find the
2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to be
a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part works
correctly. If I go into the query for the jobs, all I have to enter is a
job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different
way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and here
is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Anne said:
Still, I get the same error message
Anne

On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


:

Main Form: FrmEmployeeReimb1 - single form - based on TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I place
the
ReimbID onto the main form for the second subform to use - that works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and getting
a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on any
row in
the 1st subform and it shows the jobs the amount is being distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none of
them
worked.
On the below code I get" Run-time error 438, Object doesn't
support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job
number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the third
tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Terry, beautiful, so simple, it works
Forms![FrmEmployeeReimb1]!SubExpenseReimbJob.SetFocus
and the JobID tab order is set to zero, so everything is perfect.
Thanks to both you and Ofer
Anne

Terry said:
I don't think you can go from a txtbox on a subform to a txtbox on another
without the second sub getting focus first.

[Air Code]
txtamount_onexit Forms!mainform!2ndsub.setfocus
Then
Forms!mainform!2ndsub.txtJobNum.setfocus

or

Set tab order of txtJobNum to 0 and tab yes


Anne said:
I have a subform, where the user enters the account and the amount. The
amount can be distributed the several jobs. So with the third tab I want
the move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Now that this is working, another problem
The Main form needs to be requeried before I jump to subform2, to update the
reimbID which was created for the new record in subexpenseReimb.
That is the parent linkfield for subexpenseReimbJob
I tried the after update event of expamount:
Me.Dirty = False
Me.ReimbID.Requery
Me.Parent!LinkField1.Requery
But it does not work.
Anne



Anne said:
Yes 2 subforms on the main form:

Main Form Name: FrmEmployeeReimb1
1st Subform Name:subexpenseReimb
2nd SubForm Name: subexpenseReimbJob

I know, usually I name them as example sFrmExpenseReimb, but I have a few
trial forms already there that I ran out of names.
Anne

Ofer said:
The name of the sub form you gave me, is that the name of the subform
itself,
as a form?
The name of the subform need to be the name of the square, subform,
inside
the main form.


--
In God We Trust - Everything Else We Test


Anne said:
After a few more trial and errors, it seems that access cannot find the
2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to be
a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part works
correctly. If I go into the query for the jobs, all I have to enter is a
job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different
way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and here
is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Still, I get the same error message
Anne

On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


:

Main Form: FrmEmployeeReimb1 - single form - based on
TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I place
the
ReimbID onto the main form for the second subform to use - that
works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and
getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a
calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on
any
row in
the 1st subform and it shows the jobs the amount is being
distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none of
them
worked.
On the below code I get" Run-time error 438, Object doesn't
support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job
number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the third
tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Try and use the form name
Forms![FrmEmployeeReimb1].requery
--
In God We Trust - Everything Else We Test


Anne said:
Now that this is working, another problem
The Main form needs to be requeried before I jump to subform2, to update the
reimbID which was created for the new record in subexpenseReimb.
That is the parent linkfield for subexpenseReimbJob
I tried the after update event of expamount:
Me.Dirty = False
Me.ReimbID.Requery
Me.Parent!LinkField1.Requery
But it does not work.
Anne



Anne said:
Yes 2 subforms on the main form:

Main Form Name: FrmEmployeeReimb1
1st Subform Name:subexpenseReimb
2nd SubForm Name: subexpenseReimbJob

I know, usually I name them as example sFrmExpenseReimb, but I have a few
trial forms already there that I ran out of names.
Anne

Ofer said:
The name of the sub form you gave me, is that the name of the subform
itself,
as a form?
The name of the subform need to be the name of the square, subform,
inside
the main form.


--
In God We Trust - Everything Else We Test


:

After a few more trial and errors, it seems that access cannot find the
2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to be
a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part works
correctly. If I go into the query for the jobs, all I have to enter is a
job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different
way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and here
is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Still, I get the same error message
Anne

On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


:

Main Form: FrmEmployeeReimb1 - single form - based on
TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I place
the
ReimbID onto the main form for the second subform to use - that
works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and
getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a
calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on
any
row in
the 1st subform and it shows the jobs the amount is being
distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none of
them
worked.
On the below code I get" Run-time error 438, Object doesn't
support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job
number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the third
tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Ofer,
thanks for trying to help. Tonight a light went of and I realized that I
cannot update something, which is not updated yet.
When I finish the line or record on subExpenseReimb the record is not saved,
it is not saved until I finish the line the it moves to the next line, when
I scroll up to the just save record, the ReimbID shows up on the main form
in the linkfield1.
So the problem is that I need to save the record while I am still on that
record in the subform. Then the mainform will automatically update.
How do I save the record on the subform without leaving that record?
I tried the the afterupdate event of the last field on the form which is
expamount:
If Me.Dirty = True Then Me.Dirty = False
But it does not work,
Help, so close and yet so far,
Anne

Ofer said:
Try and use the form name
Forms![FrmEmployeeReimb1].requery
--
In God We Trust - Everything Else We Test


Anne said:
Now that this is working, another problem
The Main form needs to be requeried before I jump to subform2, to update
the
reimbID which was created for the new record in subexpenseReimb.
That is the parent linkfield for subexpenseReimbJob
I tried the after update event of expamount:
Me.Dirty = False
Me.ReimbID.Requery
Me.Parent!LinkField1.Requery
But it does not work.
Anne



Anne said:
Yes 2 subforms on the main form:

Main Form Name: FrmEmployeeReimb1
1st Subform Name:subexpenseReimb
2nd SubForm Name: subexpenseReimbJob

I know, usually I name them as example sFrmExpenseReimb, but I have a
few
trial forms already there that I ran out of names.
Anne

The name of the sub form you gave me, is that the name of the subform
itself,
as a form?
The name of the subform need to be the name of the square, subform,
inside
the main form.


--
In God We Trust - Everything Else We Test


:

After a few more trial and errors, it seems that access cannot find
the
2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to
be
a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part
works
correctly. If I go into the query for the jobs, all I have to enter
is a
job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different
way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and
here
is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Still, I get the same error message
Anne

On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


:

Main Form: FrmEmployeeReimb1 - single form - based on
TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the
event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I
place
the
ReimbID onto the main form for the second subform to use - that
works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and
getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a
calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on
any
row in
the 1st subform and it shows the jobs the amount is being
distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none
of
them
worked.
On the below code I get" Run-time error 438, Object doesn't
support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the
last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job
number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the
third
tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
--
In God We Trust - Everything Else We Test


Anne said:
Ofer,
thanks for trying to help. Tonight a light went of and I realized that I
cannot update something, which is not updated yet.
When I finish the line or record on subExpenseReimb the record is not saved,
it is not saved until I finish the line the it moves to the next line, when
I scroll up to the just save record, the ReimbID shows up on the main form
in the linkfield1.
So the problem is that I need to save the record while I am still on that
record in the subform. Then the mainform will automatically update.
How do I save the record on the subform without leaving that record?
I tried the the afterupdate event of the last field on the form which is
expamount:
If Me.Dirty = True Then Me.Dirty = False
But it does not work,
Help, so close and yet so far,
Anne

Ofer said:
Try and use the form name
Forms![FrmEmployeeReimb1].requery
--
In God We Trust - Everything Else We Test


Anne said:
Now that this is working, another problem
The Main form needs to be requeried before I jump to subform2, to update
the
reimbID which was created for the new record in subexpenseReimb.
That is the parent linkfield for subexpenseReimbJob
I tried the after update event of expamount:
Me.Dirty = False
Me.ReimbID.Requery
Me.Parent!LinkField1.Requery
But it does not work.
Anne



Yes 2 subforms on the main form:

Main Form Name: FrmEmployeeReimb1
1st Subform Name:subexpenseReimb
2nd SubForm Name: subexpenseReimbJob

I know, usually I name them as example sFrmExpenseReimb, but I have a
few
trial forms already there that I ran out of names.
Anne

The name of the sub form you gave me, is that the name of the subform
itself,
as a form?
The name of the subform need to be the name of the square, subform,
inside
the main form.


--
In God We Trust - Everything Else We Test


:

After a few more trial and errors, it seems that access cannot find
the
2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to
be
a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part
works
correctly. If I go into the query for the jobs, all I have to enter
is a
job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different
way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and
here
is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Still, I get the same error message
Anne

On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


:

Main Form: FrmEmployeeReimb1 - single form - based on
TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the
event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I
place
the
ReimbID onto the main form for the second subform to use - that
works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and
getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a
calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on
any
row in
the 1st subform and it shows the jobs the amount is being
distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none
of
them
worked.
On the below code I get" Run-time error 438, Object doesn't
support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the
last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job
number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the
third
tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 
Try the save command

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70



--
In God We Trust - Everything Else We Test


Anne said:
Ofer,
thanks for trying to help. Tonight a light went of and I realized that I
cannot update something, which is not updated yet.
When I finish the line or record on subExpenseReimb the record is not saved,
it is not saved until I finish the line the it moves to the next line, when
I scroll up to the just save record, the ReimbID shows up on the main form
in the linkfield1.
So the problem is that I need to save the record while I am still on that
record in the subform. Then the mainform will automatically update.
How do I save the record on the subform without leaving that record?
I tried the the afterupdate event of the last field on the form which is
expamount:
If Me.Dirty = True Then Me.Dirty = False
But it does not work,
Help, so close and yet so far,
Anne

Ofer said:
Try and use the form name
Forms![FrmEmployeeReimb1].requery
--
In God We Trust - Everything Else We Test


Anne said:
Now that this is working, another problem
The Main form needs to be requeried before I jump to subform2, to update
the
reimbID which was created for the new record in subexpenseReimb.
That is the parent linkfield for subexpenseReimbJob
I tried the after update event of expamount:
Me.Dirty = False
Me.ReimbID.Requery
Me.Parent!LinkField1.Requery
But it does not work.
Anne



Yes 2 subforms on the main form:

Main Form Name: FrmEmployeeReimb1
1st Subform Name:subexpenseReimb
2nd SubForm Name: subexpenseReimbJob

I know, usually I name them as example sFrmExpenseReimb, but I have a
few
trial forms already there that I ran out of names.
Anne

The name of the sub form you gave me, is that the name of the subform
itself,
as a form?
The name of the subform need to be the name of the square, subform,
inside
the main form.


--
In God We Trust - Everything Else We Test


:

After a few more trial and errors, it seems that access cannot find
the
2nd
subform. Any ideas on how to restructure the form.
I do like the general idea of the way I am doing it, but there has to
be
a
way of accomplishing this.
This cannot be an unsual structure.
TblExpenseReimb, TblExpenseReimbJob, linked by queries. That part
works
correctly. If I go into the query for the jobs, all I have to enter
is a
job
number and the ReimbID updates from the TblExpenseReimb. I know the
structure is correct, because it works.
I need some idea on how to perhaps structure the form in a different
way.
Select Employee, autonumber reimbID, select AcctNo and Amount, and
here
is
the problem, entering several jobs for that amount.
Can someone point me to where I can improve the forms?
Anne


Still, I get the same error message
Anne

On the on exit event of the subexpenseReimb field write the code

Forms![FrmEmployeeReimb1]![subexpenseReimbJob].form![JobID].setfocus


--
In God We Trust - Everything Else We Test


:

Main Form: FrmEmployeeReimb1 - single form - based on
TblEmployeelist
- has unbound textbox "linkfield1" to link to 2nd subform

1st Subform :subexpenseReimb
- continuousform: (linked to Main form by EmplID)- With the
event:
Private
subform on current event: me.parent.linkfield1 = me.reimbID I
place
the
ReimbID onto the main form for the second subform to use - that
works

2nd SubForm: subexpenseReimbJob
- continuousform: (linked to main form by ReimbID to linkfield1)

Trying to jump from subexpenseReimb field: ExpAmount to
subexpenseReimbJob
field: JobID

I like the continuous forms, because of the ease of input and
getting a
total for each employee, where on the second form job numbers are
entered,
which could be quite a few or sometimes just one. Later a
calculation
distributes the expamount equally to all job numbers entered.

The way I have it working right now, is very nice, I can click on
any
row in
the 1st subform and it shows the jobs the amount is being
distributed
to.

I just need to make it easier to get to the jobs field.
Perhaps there is a better way of doing it.
Anne


Can you post the code you wrote.
The name of the main form-
The name of the second sub form , in the main form
The name of the field

--
In God We Trust - Everything Else We Test


:

I tried all different variations of the below code, but none
of
them
worked.
On the below code I get" Run-time error 438, Object doesn't
support
this
property or method.
Any other suggestions?
Anne

Try and set the focus to the field in the second subform.

On the on after update event, or then on exit event of the
last
field
in
the first sub form, you can enter the code

Forms![MainFormName]![SecondSubFromName].Form![job
number].setfocus
--
In God We Trust - Everything Else We Test


:

I have a subform, where the user enters the account and the
amount.
The
amount can be distributed the several jobs. So with the
third
tab
I
want
the
move the the job number field on the second subform..
How can I do that?
Tanks,
Anne
 

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

Back
Top