I've got a DB, which has 3 forms ( all 'under' 3 navigation buttons/tabs ). The main form ( Client's form ) is set to show first, and currently has a recordsource of about 1350 records. I think the size of the recordsource, and the fact it 'loads' the other two forms all 'in one go', is slowing it down ( between 5 and 10 secs. to load ).
I read I should set the Visible properties of forms, not shown immediately, to false, only setting them to True in the On_Load event - when Tab is selected. Ideal I thought. However, I can't find this property in the Form's property sheet.
I'm having trouble with access. Basically it has been very slow to load (over 30 seconds when not opening a database) and when opening a database it just crashes.
Has anyone any idea what could cause this as it worked fine before ?
I have a form (Pipeline) with an on load event that automatically directs the user to a new empty record.
Code:
Private Sub Form_Load() DoCmd.GoToRecord , , acNewRec End Sub
Now my problem is that I am trying to design a 'search form' that will allow the user to look up a specific record in the main form by pressing a command button. Creating the search form is easy enough. I cannot figure out how to override the on load event in the main form when pressing the command button.
As it is right now, the button opens the form and then go directly to a new record.
Hello all, I have a continuous form that is slow on loading a portion of the code. The form is designed to pull students who need to be either warned or terminated based off of their GPA. Below is the code that is delayed in being displayed on the form:
Public Function warnOrTerminate(creditAttempt As Integer, GPA As Double) ' these numbers are from the "satisfactory progress" portion of the catalog
'warning if the following is true 'GPA<1.5 and ([cAttempt]<=15) 'GPA<1.9 and ([cAttempt]>=16 and [cAttempt]<=30) 'GPA<2.2 and ([cAttempt]>=31 and [cAttempt]<=45) 'GPA<=2.4 and ([cAttempt]>=46)
'terminate if the following is true 'GPA<1 and ([cAttempt]<=15) 'GPA<1.5 and ([cAttempt]>=16 and [cAttempt]<=30) 'GPA<1.75 and ([cAttempt]>=31 and [cAttempt]<=45) 'GPA<=2 and ([cAttempt]>=46)
Select Case creditAttempt Case Is <= 15 If GPA < 1 Then warnOrTerminate = "Terminate (1.0)" ElseIf GPA < 1.5 Then warnOrTerminate = "Warning (1.5)" End If
Case 16 To 30 If GPA < 1.5 Then warnOrTerminate = "Terminate (1.5)" ElseIf GPA < 1.9 Then warnOrTerminate = "Warning (1.9)" End If
Case 31 To 45 If GPA < 1.75 Then warnOrTerminate = "Terminate (1.75)" ElseIf GPA < 2.2 Then warnOrTerminate = "Warning (2.2)" End If
Case Is >= 46 If GPA < 2 Then warnOrTerminate = "Terminate (2.0)" ElseIf GPA < 2.4 Then warnOrTerminate = "Warning (2.4)" End If
End Select
Everything works fine - but the field that shows the end user to either warn or terminate the student shows up very delayed. Any thoughts or ideas on speeding this up??
I'm developing in Access 2007 and created a runtime version.
When the user clicks the X to close the runtime application, the main form's Load event fires. Any clues as to why this might be? Some of the code is based on other forms that do close, so of course errors start flying. Note, this is only in the runtime version; the accdb file works just fine.
My current workaround is to put the offending code into the forms On Current event, which I'm able to do in this context.
Is it wrong to think that a forms On_Load event shouldn't be firing when the application is closing?
I have a ms access application in Front End and linked tables to sql server 2008 r2 in back end.. every time I open my application the linked tables ask to me for the user and password of the sql server user of the odbc conection. I want to connect to my sql database without login every time the user open the application, I know that can be possible if I start session from vba code...
I have a query that I am using as recordsource for a form. I also have a list box that I am using to change records on the form.
My issue is I need to use the same form for similar queries. For example, I want to open the form with only "Manager1" records displayed. So I need to do a different query. I don't want to use parameters or have employees type the manager in. It needs to be just a button they click.
So my two options are - make 10 copies of the form each with their own new query recordsource for each manager, or use one form and dynamically input the recordsource before the form opens..
I want to do that -- but when I try the list box gets all screwed up. Because the list box is relying on another SELECT query to populate. I have 10 buttons each with a different recordsource query feeding into the form when I click but I get so many errors in the fields when the form opens.
I currently have a Job Management System where the Customer Order Form displays all jobs via a main form and an order details subform. This form is used for inputting new jobs and for viewing existing jobs via links from other reports such as a job schedule or customer orders report. It is always reached via a clicking of a "New Customer Order" Button where the form is filtered to new record or via double clicking on an order number in another screen and filtered via the order number.
I am now in a position where the database is growing too large and I want to archive the data in the Orders / OrderDetails Tables into Financial Years and put them in a separate backend database. However the jobs will still need to be viewed via the customer order form in order for them to be duplicated the following year.
I have created a union query of the PreviousFY and Current Orders to allow the "search jobs by customer" query to work. This works fine, but I now need to make the record source of the Customer Order form dynamic.
I have created a CurrentFY query to feed the form if it is a current job and a PrevFY query if it's from the previous FY.
I have written code to check the OrderDate against the financial year to work out which database the job is from and set recordsource according to that result. This is currently in the OnCurrent event as I also have other code there that checks details of the order to determine if fields should be editable.
However I am finding that when I parse the order data between the forms the "new record" command or the order number is not being retained or checked. If this because I don't have a recordsource set when it opens?
I tried setting the recordsource as the currentFY on open and then do the check but that didn't work.
Hi, I have a table in a form. I want to hook onto the event that occurs as each and every row is being loaded (ie to change the colour for a row). Which object and which event? Thanks
I have a combo box with four choices. I then have four labels. If i select A in the combo box i want LabelA to show up, B in combo box Label B (but not Label A) and so on.
I have set the property for all labels to (not) visible.
Then on the combo box I have put (On Click) event if cmboxx is "A" then me. label A.visible = true else me.label A.visible = false end if.
This works fine if I am entering a new dataset but when I exit from the database and then go back in, the label is not visible. I have tried entering the code in the OnLoad event of the form but that doesn't work. Any ideas?
Also - if the combo box also has its selection made before I enter this code then the label is not visible until i go back and re-enter (ie" click) it. Any ideas
I have a main report with 3 sub reports.The Sub reports have onload events that fill up the text boxes with VBA code. When I open the sub report alone everything works fine. But when I open the main report, the on load of the subreport wont work.
I have a simple add form that will add an entry to one of two tables: Box 1-1, or Box 1-2.
They have the exact same fields. In the add form, I want the user to specify a Rack field and a Box field. Box 1-1 would be Rack 1, Box 1. Box 1-2 would be Rack 1, Box 2 (there will be more tables later, but just using two for now until I get it working).
But right now my form always adds to the table Box 1-1 - I can't get it to switch.
I've added the code I have so far below. The first part is what I'm having trouble with, the second part just uses a Submit button to add a new record - I'm just including it in case it's interfering in some way I'm not seeing. I'm running Access 2007.
Code: Private Sub Switch_BeforeUpdate() If Me.Rack.Value = "1" And Me.Box.Value = "1" Then Form_Add.RecordSource = "Box 1-1" ElseIf Me.Rack.Value = "1" And Me.Box.Value = "2" Then Form_Add.RecordSource = "Box 1-2"
I have a report that runs code in Report_load, and based on the value of a field it sets some objects Visible=False and others Visible=True etc..
Now I'm trying to move away from acViewPreview and print direct to the printer with acViewNormal but the Report_Load event doesn't run. Is there a different way to run that code when printing directly?
I have a form with a (large) number of controls which acts as a kind of read-only dashboard of data. The data is split across a number of tables (4, for now, but may grow) I've created a query which amalgamates all of the data from the tables into a single dataset and set that as the RecordSource (Snapshot) of the form. I now want to bind each of the controls to a particular field returned by that query.
However - I have a combobox (same form) which allows users to select a date and I need the controls to update with the relevant data for that date whenever the combobox is changed. The query already returns values for each field over a range of dates so the data is available within the form's RecordSource - I just don't know how to include the date criteria, as specified by the combobox, when binding each individual control?
Is it possible to load the data in input from by double clicking on data from list box ?
I have single form on which both input form and read-only form is present. as i used visible property to display or not accordingly.
User enters the data from input form. (It has been done)
User go onto read only form where combo box and list box. from drop down values load into list-box. (It has been done)
Now double click on any record then it should re-directed on input form with loading the data in editable mode for updation purpose. ???? (How this step will be done) ?
i searched for slow loading and found some fast internet packages on <web address removed by moderator>. By following the tips i just purchased now fast broadband but now i am facing the problem of slow loading on my local computer, is it due to any bugg with microsoft package or my system is infected by virus.
I have a Continuous form that is used to place orders in my Purchase order Database. I have a combo box with a Textbox over laid, so the users can type in the Textbox and it filters the combo box as they type. This is to search Nominal ledger codes that the current user has set up.
This has been working fine, but now finding issues as people have 400+ Nominal coeds set up. So there is a lag when the user is typing.Is there a better way of doing this? i have a similar setup to search a supplier but this is not a continuous form and the majority of objects are un bound.
Code:
Private Sub lstSelect_AfterUpdate() Me.lstSelect.RowSource = "qryCurrentNominalNew" End Sub Private Sub lstSelect_BeforeUpdate(Cancel As Integer) Me.lstSelect.RowSource = "qryCurrentNominalNew" End Sub
i am using a form like form customer orders in northwind 2003 database. in my form there are 3 sub forms.data of subform1 will be filtered by one of the field in the main form.subform2 will be filtered by one of the field in the subform1 and ...
also i have added some code for highlighting current row of each form/sub form , now my problem is when navigate thorough records of main form by using navigation button , showing each record after pressing navigation button is a bit slow (it takes 5 seconds), problem is from subforms or codes for highlighting current row?
I am using John Big Bootys Dynamic Search Form (built in Access 2003) as it totally met my search requirements, however when typing anything into the search box it is realy slow, taking several seconds for each letter to show in the box.
This has always been a problem now and again, however some of us have upgraded to Office 2010, (although still using the 2003 built Db as we won't move to a 2010 version Db untill March next year) and now the problem is even worse that ever. Everything else seems to work really well except for this search function, however it is the search function that is used more that anything else.
I have built a database which has a number of forms with a frm_PartNo subform in.When ever I click a button to load one of these forms I get the following error message: ECN Database v1.31 cannot find the referenced form 'frm_PartNo'. But when the form loads the sub form is there with all the related data !
I'm a newbie using Access 2007.I am trying to make things as easy as possible for the user of a database that I have been working on. The users maximum screen resolution is 1600 x 900 and I want to have specific forms automatically "maximise" to fit the screen.I have set the Form property "Fit to Screen=Yes" but it does not do what I am expecting and want.I also have "Auto Resize=Yes"
I am having a problem filtering a form on load.What I am trying to say is if the role = Agent then filter on todays completed records and records that have a completed date of Null for the particular agent.
Here is the code:
If Me.txtRole = "Agent" Then AgentFilter = "(CASEOWNER ='" & Me.txtName & "')" DateCompletedFilter = "((DATECOMPLETED = #" & Date & "#)OR (DATECOMPLETED Is Null))" DoCmd.ApplyFilter , AgentFilter & " And " & DateCompletedFilter Exit Sub End If
The filter on the agents works and the filter on the completed date of null apeears to work however when a record is completed it diappears on refreshing of the form even though the record has been completed on todays date.I have investigated the code an the issue appears to be with the DATECOMPLETED = #" & Date & "# part of the code.
I'm trying to open a specific set of records when the form is first opened (namely the most recent date that was added). I'm trying something along these lines and am simply unable to get it to work:
Private Sub Form_Load() Dim strQry As String strQry = DMax("TranDte", "Transaction") DoCmd.OpenForm "FrmSalesInp", acNormal, "", "[Transaction]![TranDte]=" & strQry, , acNormal End Sub
Is there a way to add default text on a form when it loads via vba?
I have a form (frm_add_targets), which has 15 fields on it and I would like to add default text to these fields if the field should be null.
For example: one of my form fields is called: w_text1 and I would like to default the value of this field to the following: Significant amount of revenue at risk 1)<50k,2)up to .5mil,3)up to 3mil,4)up to 5 mil,5)>5 mil should it be empty on load,