![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Does anybody have an idea of why it opens on the GettingStarted tab? |
#3
| |||
| |||
|
|
When you open the Contacts Web Database it opens immediately to the GetStarted tab, the forth tab on the form. *I have looked under File/Options and see the opening form is Main. *But I see nothing that "starts it" on the GettingStarted tab. *Since there is no code one can't easily look for a Form_Open routine that might start that tab as the first. *Does anybody have an idea of why it opens on the GettingStartedtab? |
#4
| |||
| |||
|
|
If you open the Contact database and look at the navagation pane on the left side of the screen you'll notice a macro called Autoexec. |
|
If you open this macro you will see that the form GettingStarted is called. |
#5
| |||
| |||
|
|
?"Salad" wrote in message news:xYydnS-etq3PJ8XQnZ2dnUVZ_s6dnZ2d (AT) earthlink (DOT) com... Does anybody have an idea of why it opens on the GettingStarted tab? Yes, the first form that loads in the nav control is ContactCard. If you look at the on load event of that form, it executes a browseto command to make the 4th Getting started tab active. In fact, this is a far more traditional use of the browse to command, and is far more easy to understand. While the browse to command is macro code, I shall re write that code as VBA for you. We shall assume we have a global var called tmpFirstVist as a Boolean. Also, there is a browseto command in VBA, the format is: DoCmd.BrowseTo acBrowseToForm, _ "Form to load or make Active in the nav control set", _ "Name of Navigation Sub form to act on", _ "a where condition just like in open form" As I said, the challenge in web based systems is you have to toss out the idea of one form opening another form that then opens another form. The reason being is we do not want each separate form to become a new separate browser window. It becomes impossible to force the user to close one browser to return to another browser. As noted, one browser open could be your form, and the other one might be a Google search and the other might be eBay. So you want to keep the user inside of ONE browser launched. If you look close at the above browse to command, it also even has a where clause. So, browse to is much what you want to use in place of open form (at least when you do not want a new browser session to open + launch). So, now, re writing the Macro code in VBA we get: if isnull(tmpFirstVist) And Isnull([ID]) Then DoCmd.BrowseTo acBrowseToForm, _ "GettingStarted", _ "Main.NavagationSubForm" tempFirstVist = True End if So, this browse to command simply says please browse to a form called GettingStarted, and that is to occur in the Nav control subform called Main.NavagationSubForm. Note that I should point out that if you specify a form THAT IS NOT PART of the NavContorl, then the form WILL OPEN ANYWAY. What the browseto does is simply replace the CURRENT form in the NavagationSubForm. that is highlighted in the nav set. So, keep in mind THAT WHEN the form exists in the Navigation form, then the tab in that nav form becomes active and selected and highlighted and the form displays. So, browse to is NOT limited to the case where the form exists in the Navigation control. While in many or most cases browseto will be used to highlight what form is to be displayed in the nav control such as in the above example, it is not limited as such. As noted, in the previous example, browseto was used to change the sub form from the image sub form to the video player form. So, browse ALWAYS operates on a sub form. And it can be also a sub form inside of a sub form such as for the video play example. So what tab becomes highlighted became highlighted ONLY due to the fact that the form exists in the Nav control set. As noted, if that form specified in the browseto is NOT part of the navagation control set, then the sub form control where we specify the form to be loaded into will still work, but the active tab will not change. So, think of browseto as simply a open form command, but you ALWAYS LOAD that form into a subform. We do it this way since we do not want a new browser window to open when we open a form. Hi Albert: Thanks for the update. I know I have some confusion with |
#6
| |||
| |||
|
|
On Feb 14, 12:14 am, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: When you open the Contacts Web Database it opens immediately to the GetStarted tab, the forth tab on the form. I have looked under File/Options and see the opening form is Main. But I see nothing that "starts it" on the GettingStarted tab. Since there is no code one can't easily look for a Form_Open routine that might start that tab as the first. Does anybody have an idea of why it opens on the GettingStarted tab? If you open the Contact database and look at the navagation pane on the left side of the screen you'll notice a macro called Autoexec. If you open this macro you will see that the form GettingStarted is called. I changed this to the ContactDetail form. When the database was started again it started with the new form instead. Charlie cphelan (AT) cdpinfo (DOT) com www.cdpinfo.om |
#7
| ||||||
| ||||||
|
|
If I click the design tab and select Property sheet I get the property sheet for form Main. There appears to be no button to select "Form" for form Main, I seems must use the combo dropdown in the property sheet. |
|
There are no events for those tabs on the NavigationSubform. |
|
Is the real information stored under the Data tab in the NavigationTargetName? |
|
I was thinking there'd be an easy methiod to reorder the tabs on the navigation form. There's no "Reorder" window, no indexes I see. I use the left mouse to drag the tab to a new postion. Sometimes it works, other times not. |
|
That seems odd. How can TmpFirstVistit be null when it hasn't been initialized? |
|
On the AddNew tab of contact card the Macro for it starts off with On Error (Fail,). |
#8
| |||
| |||
|
|
Did the team provide 2 templates; Plain and Web? If there are 2 versions that'd be nice. |
#9
| |||
| |||
|
|
?"Salad" wrote in message news:-Nqdncyj8OSy0sTQnZ2dnUVZ_oCdnZ2d (AT) earthlink (DOT) com... If I click the design tab and select Property sheet I get the property sheet for form Main. There appears to be no button to select "Form" for form Main, I seems must use the combo dropdown in the property sheet. Yes, the above is a bit annoying. It selects the FIRST control on the form. I guess most of the time one going to modify contorls on a form. However, yes to thus to select the form, you have to use the drop down. I now just click in the combo box, and with my left hand hit f + tab key. I do this now without even thinking about it. There are no events for those tabs on the NavigationSubform. No, there is not. However, if you switch a tab, then the forms on load command is going to run. So, not a big problem. Is the real information stored under the Data tab in the NavigationTargetName? Not really. All that is occurring here is when you click on a nav choice, the subform source object is changed to the form we want. You could have coded very much the same effect in the past with VBA and setting the source object of the Navigation Subfom - this nav system simply does that for you, and also includes the possible where clause if you want. Try clicking on one of the button choices in that nav set and then note the property sheet - (the data tab on that sheet), you see the property called "Navigation Target Name", and "Navigation Where Clause" I was thinking there'd be an easy methiod to reorder the tabs on the navigation form. There's no "Reorder" window, no indexes I see. I use the left mouse to drag the tab to a new postion. Sometimes it works, other times not. Highlight the one button, then click and hold, now try dragging/moving it to the left, NOTE CLOSE the orange vertical bar - that is standard when using a layout control as to where the control will be dropped. In this case since the moving can only be left or right, then make sure you do not drag up/down else you not see where the orange insert bar is going to show. That seems odd. How can TmpFirstVistit be null when it hasn't been initialized? it is null when not yet initialized. On the AddNew tab of contact card the Macro for it starts off with On Error (Fail,). Did you try the combo drop down of options? You get 3 choices: Next Macro Name Fail If you choose Macro Name from above, then you are to fill out the next part of the macro command Called Macro Name. If you choose Next, or Fail, then you do not need to supply the macro name. Excellent. I have two questions from above regarding the macro statement |
#10
| ||||||
| ||||||
|
|
Excellent. I have two questions from above regarding the macro statement "IsNull([TempVars]![tmpFirstVisit]) And IsNull([ID])" I said: That seems odd. How can TmpFirstVistit be null when it hasn't been initialized? You replied: it is null when not yet initialized. So if I had a statement like If Isnull([Tempvars]![Junk]) and I haven't declared it (this being the first and Only reference to Junk in any macro within the database, it would evaluate as null? Declaration is not necessary? |
|
Second, the statement has IsNUll([ID]). Looking at the form there is no ID field on the form. There is [ID] as part of the recordsource. |
|
the property sheet the name is "txtID". |
|
No way, near as I can tell, of looking at the table structure as there's no design view of the table. |
|
But it's an autonumber. So, ControlSource ID, Name txtID. A little odd. |
|
Anyway txtID is an invisible field. I would have thought the IsNull([ID]) would be IsNull([txtID]). |
![]() |
| Thread Tools | |
| Display Modes | |
| |