Having subform Focus and requery errors ...

G

Guest

Hi,

I have what I call a Master form with two subforms on it. Depending on what
you do on the bottom subform will affect the top subform.

The problem I am having is moving the focus from the bottom subform to a
specific field in the top subform after a specific action is preformed.

My code is: DoCmd.GoToControl ([Forms]![frm Mat Req - Master]![frm Mat Req -
Top].[Form]![cbo Project ID])

Which is giving me an error of: Run-time error 2498, An expression you
entered is the wrong data type for one of your arguments.

Also I am having a problem requering the top subform from the bottom
subform. I do this to show the user the updated info they are building from
the bottom subform.

I know that I should know all this but am having a brain fart day already ....
 
K

kingston via AccessMonster.com

This should be of help:

http://www.mvps.org/access/forms/frm0031.htm
Hi,

I have what I call a Master form with two subforms on it. Depending on what
you do on the bottom subform will affect the top subform.

The problem I am having is moving the focus from the bottom subform to a
specific field in the top subform after a specific action is preformed.

My code is: DoCmd.GoToControl ([Forms]![frm Mat Req - Master]![frm Mat Req -
Top].[Form]![cbo Project ID])

Which is giving me an error of: Run-time error 2498, An expression you
entered is the wrong data type for one of your arguments.

Also I am having a problem requering the top subform from the bottom
subform. I do this to show the user the updated info they are building from
the bottom subform.

I know that I should know all this but am having a brain fart day already ....
 
G

Guest

Looks very nice.

Printed and bookmarked.

Thanks

kingston via AccessMonster.com said:
This should be of help:

http://www.mvps.org/access/forms/frm0031.htm
Hi,

I have what I call a Master form with two subforms on it. Depending on what
you do on the bottom subform will affect the top subform.

The problem I am having is moving the focus from the bottom subform to a
specific field in the top subform after a specific action is preformed.

My code is: DoCmd.GoToControl ([Forms]![frm Mat Req - Master]![frm Mat Req -
Top].[Form]![cbo Project ID])

Which is giving me an error of: Run-time error 2498, An expression you
entered is the wrong data type for one of your arguments.

Also I am having a problem requering the top subform from the bottom
subform. I do this to show the user the updated info they are building from
the bottom subform.

I know that I should know all this but am having a brain fart day already ....
 
G

Guest

After looking at it all a bit, I believe that my original code was formatted
correctly.

Anything I try still gets my original error and I have no idea why.

I'm gonna slog my way thru this i hope.

Lythandra said:
Looks very nice.

Printed and bookmarked.

Thanks

kingston via AccessMonster.com said:
This should be of help:

http://www.mvps.org/access/forms/frm0031.htm
Hi,

I have what I call a Master form with two subforms on it. Depending on what
you do on the bottom subform will affect the top subform.

The problem I am having is moving the focus from the bottom subform to a
specific field in the top subform after a specific action is preformed.

My code is: DoCmd.GoToControl ([Forms]![frm Mat Req - Master]![frm Mat Req -
Top].[Form]![cbo Project ID])

Which is giving me an error of: Run-time error 2498, An expression you
entered is the wrong data type for one of your arguments.

Also I am having a problem requering the top subform from the bottom
subform. I do this to show the user the updated info they are building from
the bottom subform.

I know that I should know all this but am having a brain fart day already ....
 
G

Guest

Interesting ...

I made a multi-step macro that works perfectly to do what I want yet I
cannot seem to get the code to do it even tho I have gone over the code to
many times to check for errors and tried the code in many different ways.

Anyway, I'm gonna stop getting annoyed at the computer and just use the
macro since it works ....

Lythandra said:
After looking at it all a bit, I believe that my original code was formatted
correctly.

Anything I try still gets my original error and I have no idea why.

I'm gonna slog my way thru this i hope.

Lythandra said:
Looks very nice.

Printed and bookmarked.

Thanks

kingston via AccessMonster.com said:
This should be of help:

http://www.mvps.org/access/forms/frm0031.htm

Lythandra wrote:
Hi,

I have what I call a Master form with two subforms on it. Depending on what
you do on the bottom subform will affect the top subform.

The problem I am having is moving the focus from the bottom subform to a
specific field in the top subform after a specific action is preformed.

My code is: DoCmd.GoToControl ([Forms]![frm Mat Req - Master]![frm Mat Req -
Top].[Form]![cbo Project ID])

Which is giving me an error of: Run-time error 2498, An expression you
entered is the wrong data type for one of your arguments.

Also I am having a problem requering the top subform from the bottom
subform. I do this to show the user the updated info they are building from
the bottom subform.

I know that I should know all this but am having a brain fart day already ....
 

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