Forms :: Menu Form Keeps On Opening?
Jul 28, 2013
I have a series of forms. The 1st form is my main menu. On this form I have 5 command buttons which gives the user options to ...
Button1 - Enter Station Scores
Button2 - Print Performance Sheets
Button3 - Print Audit Sheets
Button4 - System Administration
Button5 - Quit
When the user clicks one of the buttons (with the exception of the Quit button) I perform the following code (This code is for the 1st button)...
Code:
Private Sub cmdEnterStationScores_Click()
' Open select workstation
DoCmd.OpenForm "frmSelectWorkstation", acNormal, , , , acWindowNormal
' Close main menu
DoCmd.Close acForm, "frmMainMenu", acSaveNo
End Sub
So far so good...
The "Select Workstation" form opens fine with no sign of the main menu. I have a "Continue" button on this form which opens yet another form using the following code...
Code:
Private Sub cmdContinue_Click()
' Delete workstation name
Call DeleteWorkstationName
' Store selected workstation
Call StoreWorkstationName(strSelectedStation)
[Code] ....
...For some reason the "Main Menu" form reopens itself at the same time as the "Enter Sort Scores" form, so I have 2 forms on the screen, with the "Main Menu" screen on top.
Why does the Menu form re-open?
I have set breakpoints in every bit of code I have and stepped through it all, but nothing I can see references the Menu form!
View Replies
ADVERTISEMENT
Apr 7, 2014
I have a Form opening from Access Options. I would like to close this Form using the Timer. The following is the code I have used but it is not working.
Private Sub Cover_Page_Form_Load()
OpenTimer = Timer
End Sub
Private Sub Cover_Page_Form_Timer()
If (Timer - OpenTime) = 5 Then DoCmd.Close acForm, "Cover_Page_Form", acSaveYes
End Sub
Next question. If I can get this to work can I then use a DoCmd to open new Form within the code above or do I need a new process.
View 5 Replies
View Related
Jun 10, 2006
Hi,
I would like to be able to open a customer form without starting MS Access.
Is there a way to make a form an executable module?
John
View 2 Replies
View Related
Apr 25, 2014
I have a front end that I have distributed to four users. The front end sits on a shared drive and when I make design changes I just replace it and have the users copy it over to their desktops.
I set up a main menu for them to access the various forms, reports, etc. When I first open the front end on my desktop the main menu form is small and not taking up the entire screen. I put the cmd.maximize command in the on open event and still does not maximize the form when I open the database. I tried to size it and saved changes but still not working.
I just did a share session with a user and she opened the form and it was maximized on her desktop.
View 3 Replies
View Related
Mar 25, 2015
I created a form that has a drop down menu to select a name. I attempted to set it up so that once a name is selected, another form is opened with that person's information. I was able to get it set up so that the first form closes and the second form comes up, but I can't get it to filter the name. I tried using SetTempVar and then SearchForRecord, but got nothing. I tried using OpenForm and Where Condition equals the search, but just got the automation error. It is currently set up using SetTempVer, OpenForm, SearchForRecord.
View 3 Replies
View Related
Dec 11, 2013
I'm trying to do right click menu on listbox.
currently i'm trying to implement a right click menu which will show a simple messege box.
My problem is that the list box is on a pop up form which opened up maximized. Now when i'm right clicking on the list box i see the right click menu but when i'm clicking on one of the menu options, nothing happenning (it seems that it don't go to the function as it should). i've also putted breakpoints on the function but it never tips.
It's important to mention that if i'm setting the form popup option to no the right click menu works perfectly (when i'm clicking on one of the options i see its matching messege box).
I'm running the following vba code:
This is the mouse up event handler for my list box:
Private Sub Song_List_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' Call the SetUpContextMenu function to ensure it is setup with most current context
' Note: This really only needs to be setup once for this example since nothing is
[Code] .....
setting up the "SetUpContextMenu" sub:
Public Sub SetUpContextMenu()
' Note: This requires a reference to Microsoft Office Object Library
Dim combo As CommandBarControl
' Since it may have been defined in the past, it should be deleted,
' or if it has not been defined in the past, the error should be ignored
[code].....
View 3 Replies
View Related
Apr 14, 2015
I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.
The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.
The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.
View 9 Replies
View Related
Nov 5, 2013
I'm trying to get a combo box & button to work together. On the main form of the attached database, I just want the button to go to the associated record based off my selection (or entry) in the combo box.
I've tried the following:
- Looked through the Northwind sample database for a close example. Tried my best to replicate the functions but it didn't work
- Looked through other examples posted and tried to manipulate the code to no avail
- Tried using [Forms]![Main Form]![cmbLastName] in both the filter & criteria section of the macro
View 4 Replies
View Related
Mar 14, 2013
I am using Access 2010 - Version 14.0.61.29.5000 (32-bit)
I am building a custom Export Wizard to export data to Excel using the Report Wizard for the basic ideas.
All I am trying to do is have a [Back] button on a form to open another form and close the current form.
Private Sub cmdBack_Click()
DoCmd.OpenForm "frm_ExportWizardPage2", , , , , , Nz(Me.OpenArgs)
DoCmd.Close acForm, "frm_ExportWizardPage3"
End Sub
The new form is opening but then the current form is not closing. All forms are the same size, shape and positioned centrally although this should not make any difference.
Could this be anything to do with which form has the focus when I open the new form?
View 2 Replies
View Related
Jun 20, 2014
I have backend/frontend database with several front end users who enter their activity on a daily basis. I need each front end to only show their own entries. I have an ID table with each staff name and ID. In the form I have asked it to open only specifically to a staff ID with this requirement in the properties. I have also set this in the field [ID2] itself.
[Forms]![frm_Ownership_ID].[ID2]
My problem is that when the database/navigation form opens, it always asks for the ID in a message box.How do I stop this from happening i.e. just open the database with specified staff ID.
View 2 Replies
View Related
Jul 18, 2013
I'm creating a database to track new policies request. I have a form in datasheet view that displays a list for all Initial Review and Draft status. I would like to click (... or maybe double click) on the Policy Name field that will display all fields into single form that is link to PolicyID ... to update any info needed. In other words i want to click on that record to be display in actual form.
Private Sub PolicyName_Click()
Dim stDoc As String
Dim stWhere As String
Dim strsql As String
Dim DB As DAO.Database
[code]....
View 1 Replies
View Related
Apr 15, 2013
I have a very simple table of basically a unique number and a couple data fields. On my form with those same fields, I need to be able to create a button that opens a pdf file that is named the same as that unique number. Here is the kicker...I have been able to create a hyperlink with a link to that file and it works fine.... I am trying to set it up so that the file name is automatically put into the hyperlink statement according to what the unique number is for each record.
what I did so far...
in my hyperlink: *file://c:/docubase/3840.pdf (only put * in so not a link here)
this works fine but I need the syntac to make that line take into account the account field (ID) for each record. So something similar to this (already tried this and it doesnt work)
*file://c:/docubase/[id].pdf
View 11 Replies
View Related
Jul 7, 2014
I want to lock a form but keep it visible when a 2nd form opens in front of it. I would also like to keep the 2nd form on top. How to do these 2 things?
View 14 Replies
View Related
Feb 8, 2015
I have a table with a schedule of tasks that are required weekly for the next year. Each record has Monday's date as the Scheduled_Date" for the task. From my main form, I have a command button to open a form linked to the table, so that amendments can be added to the table for each record (i.e. - If a task is complete/incomplete/progressing etc. the user marks it so.
What I would like to do is have the form open at the task scheduled for the current week, based on the "Scheduled_Date" value. Whilst I can do this with a simple filter, I would like the form to open with all records available to the user so that they can go forwards/backwards as they wish, but the first record they see when the form opens is the one specific to this weeks date.
View 4 Replies
View Related
Mar 14, 2013
I have a folder called site docs on our server m:/estates/sitedocs...I want to have a button that opens this folder but in the correct site sub folder
Ie:- primary Key on form site number 0001S if i click site docs button i want it to open folder in estates.sitedocs/0001S or which ever site number form i am in for that site number
View 1 Replies
View Related
Jun 7, 2013
I am working on a form as a user interface. I have added an picture to the form and it will change, according to the selection in the combobox. It looks small, and not clear because of the size, and each image has different sizes. I would like to know if there is a a way that will allow me to click on it, and then it will open in another window so it is bigger with the right sizes. I was thinking that it could be something in the on click event.
View 7 Replies
View Related
May 8, 2015
I've done this dozen's of time - but it doesn't seem to be working now. I have a continuous form (frmHome) where i want a user to be able to click on a record, and be able to open up that specific record in "frmCustomer". The key field here is pkCustomerID (i have it in the query).
frmHome is run off a query ("qryCustomer").
frmCustomer has "tblCustomer" as the source.
The code i've used on a button on "frmHome" is:
DoCmd.OpenForm "frmCustomer", , , "[pkCustomerID]=" & Me!pkCustomerID
It always only open Record #1.
View 7 Replies
View Related
Nov 6, 2013
Using 2010.Would like to open a new form as a popup to display the results of a query. Trying to avoid eliminating objects in my DB, so not wanting to create Query Objects, but just creating the SQL on the fly.
The purpose of opening the popup form is to display the results of the Query based on a Button selection that the user chooses. Not sure if I can pass the Query from Form to Form, or if the called Form should run the Query. The Query output is a single record which is a Memo field, which is why I want to open the new form to display the result. The Memo text can be a page long or more.
I am not getting any errors and can open the form. The problem is that I am not getting the Query results displayed on the new form. The code below is from my first form that has the buttons. The popup form is Results_frm.
Code:
Private Sub InScope_bt_Click()
Set dbs = CurrentDb
strSQL = "SELECT In_Scope FROM Project_Scope_Deliverables"
Debug.Print strSQL
ResultType = "I"
DoCmd.OpenForm "Results_frm"
Forms!Results_frm.RecordSource = strSQL
End Sub
View 11 Replies
View Related
Jan 29, 2014
A receive a compile error when an OpenForm macro action is executed. The error message is: The form you referenced may be closed or may not exist in the database. Microsoft Access may have encountered a compile error in a Visual Basic module for the form.
How do I fix this compile error ?
View 10 Replies
View Related
Dec 31, 2014
I enclose a part of my project. I've taken out the table, query and so on.Only the form.What i want to do is to view only the form when entering the app. But if you open the file you could see a flash of the app before minimizing it. Very few, but you can see it. I've deleted some more code in the opening form that made the flashing a little bit longer.My code for entering is the following:
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.RunCommand acCmdAppMinimize
Call fSetAccessWindow(0)
End sub
And then in another module:
Code:
Option Compare Database
Option Explicit
Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3
[code]...
how can I avoid this flashing at start?
View 2 Replies
View Related
Aug 15, 2014
I have a list box, List3, in a form, which is populated from a query. The list populates correctly.I added a command button which I want to open a new edit form with the selected record from the List3 control.I used this code on the DoubleClick event - it opens the form EditEquipment, but the form does not have the relevant record, ItemID, open in it. It's an autonumber field and primary key. Is there something I now need to do in the EditEquipment OnLoad event or something like that?
Private Sub Command5_DblClick(Cancel As Integer)
If Len(Me.List3 & "") > 0 Then
DoCmd.OpenForm "EditEquipment", acNormal, , _
"[ItemID] = '" & Me.List3 & "'"
End If
End Sub
View 10 Replies
View Related
Jan 21, 2015
when i want to open the database in an access database i have the following error. you have as the event property setting the expression entered when open.This expression has caused an error amppu (database name) can not find the form that is referred to
View 4 Replies
View Related
May 20, 2013
I have a form with a subform. Every time I open the form I want it to open to a new record in the subform (but not necessarily a new record in the main form; that will depend on some other stuff that I've already taken care of).I found a way to do that using the following VBA in the main form:
Private Sub Form_Current()
Me.EventSubform.SetFocus
DoCmd.GoToRecord , , acNewRec
End Sub
It works great, but it causes Access to automatically scroll down to the start of the subform, blocking the view of information in the main form that the user needs to see. I've tried adding a line to Form_Current() to reset the focus to the main form but it doesn't seem to work.
View 5 Replies
View Related
Aug 4, 2014
I have a report that runs a parameter query identifying which StudentID it wants to run the report of, and what month/year.I want to leave the month/year as a parameter, but what I want to do is get the record that I selected from the listbox (IE. student 1000) and then when I click on Run Report Card, it wouldn't ask me for the parameter of the student, but just the year, and then it would run the report card for the student I selected.
I tried doing the open report macro and in the where row I put
[StudentID] = [Forms]![Form1]![List12]
but it didn't seem to work.
View 1 Replies
View Related
Jun 24, 2014
I currently have a database which has a fairly simple form linked directly to a table, which records staff attendance information.
It generally works really well, however there is one thing I would like it to do, which is be able to hide certain records from view (rather than delete them completely).
I have a checkbox on the form (bound to a corresponding field on the table) called chkHide (the field in the table is called hide), which is not visible in form view; I have a button that is visible and when pressed by a user it will change the value of the check box to True.
So far so good. However, I would then like to have the form refresh and when it does so no longer show the record to the user (so it looks like it has been deleted, but in fact that record remains in the table).
I have tried applying a filter on load, but I don't know what expression to put in the Filter on the Property Sheet - - I have tried [Hide] = Is Null, but that isn't right. I have also created a Query where I have set the criteria for the field 'Hide' to Is Null and then put the name of the query in the Filter box - that doesn't work either, as it will let me put in new records but not let me see any of those put in before the form was refreshed.
View 4 Replies
View Related
Sep 17, 2014
I'm trying to open a form in datasheet view using the following code
Code:
Private Sub Run_Activity_Duration_Totals_Click()
DoCmd.OpenForm ("frm_Activity_Duration_Totals_25_Hours"), AcFormView = acFormDS
End Sub
I keep getting a message saying
Compile Error: Type Mismatch
and the equals sign is highlighted in my code.
View 2 Replies
View Related