Open Access form to a specific page on a tab control on a different form with VBA - ms-access

I have created a help index on a tab control with 60 pages. Each page contains helpful information to the question that corresponds to the page. The questions that are being answered are on a different form from the tab control form. I have created a button next to each question so that the user can access the help form if they need background and instructions for completing each question. I am trying to write code that will open the form and go to the correct page based on the button that was clicked. So the button for question one would open the form and go to page 1. I have tried a few different things, and can't get it to recognize the page. Below is the code that I currently have in place:
DoCmd.OpenForm "frmTestingHelp"
Forms!frmTestingHelp.SetFocus
DoCmd.GotoPage (0)
The form opens, but cannot find the page and results in an error. I started without the second line, but added it to see if the issue was that it wasn't looking for the object in the right place.
Thanks in advance!

DoCmd.GotoPage is used only with page breaks, which hardly anybody uses. See e.g. here: http://www.functionx.com/vbaccess/Lesson13.htm and scroll down to "Using the Pages of a Form".
To select the second page of the tab control TabControl on your form:
Forms!frmTestingHelp!TabControl.Pages(1).SetFocus
or preferably, if you don't want to set the focus,
Forms!frmTestingHelp!TabControl.Value = 1
assuming you haven't changed the default PageIndex values 0,1,...

Related

Disable submit button in Google Forms?

I'm writing a form and have a multi-select with certain responses (age range); for ranges below a specified value, we redirect users to a page with information on why we don't accept that range currently, etc.
The problem is that the form navigation appears on this page, so they can hit Back (no problem) and Submit (problem).
We don't want users submitting if they wind up on this error-catch page, but I haven't seen any way of disabling or hiding the submit button.
Even checking Google scripts, it doesn't seem like this is possible? Does anyone know if there's a way to do this?
The SUBMIT button either appears on the last page, or on pages where the setting is set to: Submit Form
You probably have the error page as the last page, and the next to last page set to Submit Form.
There is no way to disable the submit button. Put the error page BEFORE the last page. Make the page that is right before the error page skip over the error page and navigate to the last page (Submit Page). On the last page have only one question like: Are you done? "Yes" "No" This way, the user will never see the submit button until they get to that last page. On the Error page, set the page navigation to go to something like back to the first page. If the user clicks BACK on the SUBMIT page, it will skip over the error page and go to the page before it. Of course, the user could navigate back, and change the answer, and get to the SUBMIT page. But then they'd be lying about their age.
You can disable the Google form by accessing Responses tab and unchecking the option Acception responses.
you can use this restrict Data in Google Sheets with Data Validationso it will show a pop up message based on DATA
https://www.howtogeek.com/428919/how-to-restrict-data-input-in-google-sheets-with-data-validation/

How to make a button in ssrs

There is a report contains 1000s of pages of data.Is there any way to make a button on the first page of the report so that ,if click on the button it goes to the end of the pages.
Is there any expression to be written,with out writing the vb.net code?
There is a button like that in SSRS (you can also type page number in the box and press enter):
EDIT:
You can add a bookmark at the end of your report and then make a textbox which will jump to it (textbox properties->Action->mark "go to bookmark" and select the bookmark you made. I am not sure, however, if it works well in excel.
Web viewer control, this button already exists.
I don't believe you can add a button to SSRS and export to Excel to go to last row.
You can use Excel command to go to last cell which should work.
Refer to [http://office.microsoft.com/en-ca/excel-help/excel-shortcut-and-function-keys-HP010073848.aspx][1]
CTRL+G
Displays the Go To dialog box.
F5 also displays this dialog box.
Click on "Special..." button and select "Last Cell" option and click OK
Sorry .. Tried posting images for you but not enough points to do so.
There are 2 ways of reaching the last page or the data on the last page:
Sol 1. #kyooryu has already mentioned above in his solution along with a screenshot.
Sol 2. You can freeze the header and set the display result to show the data on a single page. This way you will not have multiple pages and you can directly hit the end button from keyboard on the report manager to reach the bottom result set. Freezing the header will help you in identifying the column names.

processing html form partway through

Previously, I have seen web forms that are multiple pages long, but on each page, if the inputted information is invalid, it will cause an error and make the user fix their input.
However, I can't seem to find anything to show me how to do this. My form is 2 pages, with a Continue button at the bottom of the first and a Submit button at the bottom of the second. However, all possible errors generated will be on the first page, so I want it to show them if the user hits Continue when he has inputted errors.
Right now, the form is only processed after the user hits Submit and all the data is posted to the backend, which means it then has to go back to the first page to show the errors.
You could try to check the information every time the user continues to the next input control, and tell him that there's something wrong if he enters any nonsense.
How to achieve this depends on how your form looks:
Does it just contain and something like that or radio buttons and other "special elements"?
For you could check at the FocusLost event, but I don't exactly remember its syntax.

Forms calling reports in access

Step1: I open an Access form when the software opens. It acts like a switchboard manager where the user can open other forms and reports. (Popup = yes, modal = no)
Step2: Click to open a "Master Form" which also has other options. (ditto) So the original VB code called this form to be open and is still "running" in the background.
Step 3: Click to open a report based on the record selected.
So now there's 2 forms open and 1 report. User cannot toggle between them, must close one to get to the other (necessary).
On the open report, I would like to modify the rightclick commandbar. However, "Close" doesn't work because Access now shows Form1 and Form2 above as gray and Access is locked. I would like to be able to right-click to do a number of things including Close, Change to Design View, etc. But if I'm locked out like this, none of these will work.
I searched on...
1. Ending the background vba that's running - no luck
2. Setting focus on the active screen name - no luck
3. Setting focus on a control on the Form2 above - no luck
4. Tried all kinds of CommandBar things, no luck (ID choice vs. manual OnAction) and many more
I'd be happy to attach what I'm doing but it's pretty big, although I could probably cut out the sections that this applies too...
I've been searching for about 16 hours now... Anyone???
Thanks so much.
Popup = Yes in Access means two things:
The form or report stays above all other forms and reports that have Popup = No and above Access’ application window.
The form or report is not bound to the area of Access' application window and can be drawn outside of it.
You have two options:
Set Popup = No for the two forms. In this case they will be tied to the application window area.
Set Popup = Yes for the report as well, so that it can stand in front of the two forms.

Run VBA code whenever a tabbed form is reselected in Access

EDIT: For clarification, I'm talking in the below post about tabbed document browsing, not a Tab Control. However, if you're looking for roughly the same problem but regarding a Tab Control, Gord Thompson's answer is correct. Two answers for the price of one!
I've got an Access 2007 database that uses tabbed documents. I need to run some VBA code every time a user selects the form called "Reports", either via opening it or clicking on its tab if it's already open.
I could achieve much the same thing by closing it each time it's used and running the code on an OnLoad event, but ideally I'd like to keep it open so that users can keep the settings of the various drop down boxes, radio boxes etc that they've already set on "Reports".
I was hoping for an event that could run code on tab reselection, but neither of my guesses (OnCurrent and GotFocus) seem to work (OnCurrent works only when the form is opened, like OnLoad would).
Any ideas greatly appreciated - can't find what I'm looking for on Google, though I suspect that's because I don't know exactly what I'm looking for.
The .Value property of a TabControl returns the index (zero-based) of the current page. So, if I have a TabControl named TabCtl14 that contains two pages, FirstPage and SecondPage, then the code...
Private Sub TabCtl14_Click()
If Me.TabCtl14.Value = 1 Then
MsgBox "SecondPage was clicked."
End If
End Sub
...displays the MsgBox whenever I click the "SecondPage" tab in the TabControl.
Have found the answer I was looking for. It's the OnActivate event.