Navigating from one Sub Form to another sub form (1 Viewer)

Gareth_uk

New member
Local time
Today, 15:47
Joined
Dec 22, 2016
Messages
2
Hi,

I've have spent the best part of my day attempting to create a macro to simply navigate from one Sub form to another in the same main form.

I've read numerous different forums, posts, etc but I have not been able to find a solution to my problem.

Just to try and get it to work I created a very simple Navigation form with the following details

Main Form = Navigation Form

Sub Forms (Creatively entitled) = SubForm1 and SubForm2

The form that the two subforms sits in is called NavigationSubForm.

I've tried numerous different combinations of Docmd.Browesto, Set Focus and DoCmd.OpenForm with absolutely no joy.

Please Help!
 

Minty

AWF VIP
Local time
Today, 15:47
Joined
Jul 26, 2013
Messages
10,380
I don't use Macro's but suspect this page will help with the syntax you need.
http://access.mvps.org/access/forms/frm0031.htm bookmark it and keep it handy.

If you have used the inbuilt navigation form be aware that it in it's self is a form, so your Main form will already be a subform of it, which is why I dislike them and make my own navigation / switchboard forms.
 

Gareth_uk

New member
Local time
Today, 15:47
Joined
Dec 22, 2016
Messages
2
Hi Minty,

I appreciate the help with the link, but to be honest I had managed to find this earlier in the day.

Currently I have the following code

Forms![Navigation Form]![NavigationSubform].SetFocus
[Forms]![Navigation Form]![NavigationSubform].[SubForm2].SetFocus

But I keep getting Run-time error '438'

Earlier I had the macro to change between the two actual forms I want to use as this which was working, but not on the navigation form

DoCmd.OpenForm "Add Complaint", acNormal, , "[Customer ID] = " _
& [Forms]![Add Customer].[Customer ID], acFormEdit, acWindowNormal
DoCmd.Close acForm, "Add Customer", acSaveYes

I think this may be put on hold until after Christmas now!
 

Abeiis

New member
Local time
Today, 07:47
Joined
Feb 28, 2017
Messages
4
Hi ALL,
I have the same issue and posted my question in another threat today - I understand this discussion is 3 years ago, so if you have a solution in VBA, I will appreciate it, Thanks!
My issue is getting from one sub Form in Navigation Control (by clicking on a [Next] button, to a combo-Box in another tab sub-Form. MS does not make it intuitive to do nor do they give a good way to do it... I appreciate any help in that direction. If only I can understand the logic behind movement (back and forth) between Navigation Tabs that would help greatly, and some code wouldn't hurt ;-).
 

Users who are viewing this thread

Top Bottom