Closing Pop Up Forms After Loading Report

Apr 24, 2006

Hi All.

I have look through the forum but can not find a solution to my problem.

I have a popup form set to "popup" and "modal" "frmJobBookOut" which passes data to a query "qryJobBookOut". In the query there is a field called "job_no" and I have set the criteria to reference the "frmJobBookOut" ** [forms]![frmJobBookout]![job_no] ** and a report "rptInvoice" based on the query "qryJobBookOuit". This all works fine.

The report loads with the popup "frmJobBookout" form still displayed. I know that the popup form is still displayed because I have the setting "modal" and until I click on the close button it will remain on screen.

Is there a way I can close the popup "frmJobBookOut" form after the report has loaded.

I have tried many ways but not the right way.

Many thanks if you can help.

Kind regards

View Replies


ADVERTISEMENT

Generating And Loading Report

Jun 27, 2005

Hi every body. I wonder how i can generate and load a report when a button is clicked on access 2000 form. I be happy if some one show me an example.Thanks

View 1 Replies View Related

Reports :: Invalid Use Of Null Error On Loading Report

Jun 5, 2014

I am developing a database for my company which will produce reports based on data entered on various forms.

When the report opens, I would like its name to dynamically change to include the site, the client and their reference number. Although I know very little VBA, from searching this and other forums I have managed to get this to work on other forms.

On a different form, I have managed this by giving the form the caption "Caption" and then running the following code on load:

Reports("ItemisedQuoteFromQuoteFromViewSalesEnquiryFromSearch").Caption = "Our Quotation Ref: " & [StaffInitials] & "/" & [QuoteEnteredBy] & "/" & [QuotesJobsSalesEnquiryRecordNumber] & " - " & [ClientDetailsName] & " reference " & [JobsClientJobNumber]

Which will give the report a title along the lines of: "Our Quotation Ref: AB/CD/123456 - Client Name reference 987654".

On the report I am struggling with the code is:

Reports("MWUPropertyAssessment").Caption = "Property Assessment for " & [SiteDetailsAddressLine1] & ", " & [ClientDetailsName] & " reference: " & [PropertyAssessmentClientJobNumber]

However all this produces is "Property Assessment for , reference". If I try entering just "[SiteDetailsAddressLine1]", "[ClientDetailsName]" or "[PropertyAssessmentClientJobNumber]" I receive an Invalid use of Null error message.

If I create text boxes on the report for [SiteDetailsAddressLine1], [ClientDetailsName] and [PropertyAssessmentClientJobNumber] they are filled with the correct information so I know that these fields are not blank.

View 2 Replies View Related

Closing Report After Emailing

Feb 8, 2015

I have a button on a form to email a report.This is the code:

Private Sub EmailSfRpt_Click()
Dim strWhere As String
strWhere = "[Property Number] = " & Me.[Property Number]
DoCmd.OpenReport "SQ FT/LN FT ITEMS REPORT REV", acPreview, , strWhere
DoCmd.SendObject acSendReport, "SQ FT/LN FT ITEMS REPORT REV", acFormatPDF
End Sub

What is the code to close the report after the report is sent?

View 1 Replies View Related

Forms :: Form Is Not Loading

May 21, 2013

We have access DB on a server accessed by 3 workstations. When we open the shortcut it opens a form. Few days ago we started getting this error: can't find project or library..Then this code opens in Microsoft Visual Basic

Code:
Function CheckCommandLine()
If Command <> "" Then
changeTableLinks Command
End If

[code]...

Link to the database is like this:"C:Program FilesOFFICE11MSACCESS.EXE" serverdbsci.mdb /cmd serverdbsci_data.mdb....We don't get this error on Access 2007.

View 3 Replies View Related

Keeping A Form Maximised After Closing A Report

Aug 11, 2005

Does anyone know why when you click on a command button that loads a report it shows it in a print preview mode and then when you click close it closes the report window and changes the form that you were originally on to a much smaller and condensed view instead of being maximised? All the properties are making the form to maximise except when you close from a print preview view. Cheers

View 1 Replies View Related

Forms :: Loading Form At Specified Record?

Jan 21, 2015

I have a report that summarizes the record content that is contained within a form (one report line per form record). If the user wishes to view a specific record on the form, he clicks on the report control that contains a numeric value that identifies the record on the form. I can get that to work with the following code:

Code:
DoCmd.OpenForm "AdmissionForm", acNormal, , "[Admission Number] = " & Me.Text0

where Admission Number is a control on the form and Text0 is the control on the report containing the admission number requested i.e. if the report control Text0 = 10, the form would open with the current record in which admission number = 10.

Problem is though, the form opens as "filtered" with only the one requested record (i.e. record number 1 of 1). What I would like is the unfiltered form to be opened with the requested Admission Number as the current record. I have tried DoCmd.GoToRecord but can't get it to work.

View 5 Replies View Related

Forms :: Form Loading Sequence?

May 6, 2014

I have a RTE 94 happening due to a piece of code running on a subform current-event which looks at a text box on the parent form. I understand this is due to the order of loading of the forms initially and all works fine when moving to other records once all are opened. How can I overcome this happening on first opening?

I am thinking I need to set a counter on the subform on load event to say 1, then when the subform current-event fires add some code so if the counter is 1, then do nothing, if 0 then run the code. When the mainform opens reset the counter to 0, then requery the subform. The form will now see the counter is set to 0 for the rest of the time, so will then always run the code.

Not sure how to go about setting out the code as I guess there needs to be some form of Public variable involved?

View 4 Replies View Related

Forms :: Display GIF While Query Is Loading

Aug 8, 2014

I have a separate form in which I want to use as a loading screen for my users while the query loads on the other form. Now I can do this with text easy but not with a .gif..I have the loading form to

Code:
Private Sub Form_Timer()
DoCmd.Close acForm, "Loading Screen", acSaveNo
DoCmd.OpenForm "Form1", acNormal

But it just stops the .gif and then runs the query before opening Form1.

View 7 Replies View Related

Forms :: Slow Loading Of Form On Internet

May 2, 2013

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.

View 1 Replies View Related

Forms :: Error While Loading A Webpage With Form

Jun 7, 2014

I try to open a web page with a form in access 2007. During the loading of the page it shows me 2 security error messages.

I tried to change the properties in Activex and especially the Silent property from No to Yes but this is not possible. In the next restart of the form restores the original settings.

When i open the same page with Internet Explorer it doesn't show any error. I have attached the database example to see exactly what happening.

View 9 Replies View Related

Forms :: Clear Form Upon Loading - Only Allow Labels

Dec 12, 2013

I'm having trouble getting my form to be "blank" except for the labels upon loading. I've tried putting in some code "on load" but it doesn't clear everything. I haven't had this trouble on some of my other db's, the only difference here is it's a switchboard. I don't know if that matters.

View 1 Replies View Related

Forms :: Form Not Visually Loading Properly

Jul 10, 2015

I have a pop-up modal form which is loaded (like 99% of my other forms) by a button on another form.

Unlike all of my other forms, however, it doesn't load its background properly. If I drag the window off screen and back or shrink and resize, it does look right, so I guess maybe it requires a refresh?Obviously, I don't want to rebuild the form from scratch, so maybe some vba which refreshes the screen?

View 7 Replies View Related

Forms :: Loading Only Default Form On Start Up Of Database

Mar 23, 2014

I need to load my Default Form at start up of my database while office button,the Ribbon and the Navigation pane will be hidden. And when i go to form design view then i can use the ribbon and navigation pane.

View 2 Replies View Related

Forms :: Opening DB With 2003 Form Loading Error

Sep 17, 2013

I have designed a DB in access 2010 and it opens fine on my computer. However, when others I work with (who still have 2003) try to open the database, they get the following error: "An Error Has Occured Trying to Load The Form "Form Name" - Do You Wish to Continue".

When I click Yes, it brings up all of the VBA code in the background, but when i close all of that out, it still doensn't open.I am by no means an access expert.

View 1 Replies View Related

Forms :: Auto Apply Form Filter Upon Loading

Feb 5, 2015

Private Sub Form_Load()
Forms(0).ServerFilterByForm = True
End Sub

This 2002 code is producing an error ?

View 2 Replies View Related

Forms :: Textbox Controls Not Loading When Form Opens

Aug 9, 2015

I am having a hard time with this project that I'm working on at the moment.

I have created a modal dialogue form that has a macro set to open another form and close the current form at the same time. The form that is being opened has textbox controls that have the default value set to hold the data that is in the textbox controls in the modal dialogue form that is closing. The problem is, is that when the modal closes, the controls in the next form display #Name? and the data is not copied to the next form.

View 2 Replies View Related

Forms :: 2 Level Navigation Form Auto Loading First Tab

Oct 11, 2014

I have a 2 level navigation form, which loads various subforms (obviously) - however i have an issue - i have mutiple security levels and for example when i click on 'view errors' it shows me 4 subtabs - Departments - now certain people are only able to view certain departments

However if say the depts are laid out like this - Dept 1 - Dept 2 - Dept 3 - Dept 4

Then i can on form load say if strsec = 1 then dept2.enabled=false etc - however if i want to set dept 1 enabled to false it loads it by default - is there a way around this?

View 7 Replies View Related

Closing All Forms Except...

Dec 31, 2004

Does anyone know a line of code I could write that would close all other forms, besides the form the user is working on?

I can't stand it when a new form opens up and the old one is still open. I have written individual macros to close the forms, but that is getting rather cumbersome. Any help is greatly appreciated. Thanks!

View 3 Replies View Related

Forms :: Closing All Forms And Saving Records First

Jul 14, 2015

I have had some issues caused by users exiting the database entirely when they realise that they have entered something incorrectly; this in turn has caused problems re-opening the half finished record (the last step of the record creation is to allocate it a unique reference number, which is then used to re-open the record for editing on a point and click form) - now, this is entirely my fault for expecting users to clear up behind them or to exit properly.

So, I am making some changes - when the dashboard form opens it removes the database window close button. I have a separate close button which has the following code:

Code:
Private Sub cmdGoodbye_Click()
Do While Forms.Count > 0
DoCmd.CLOSE acForm, Forms(0).Name, acSaveNo
Loop
DoCmd.Quit
End Sub

However, I would like to add a line to automatically save any records before closing each form - is this possible?

View 7 Replies View Related

Opening & Closing Forms...

Sep 15, 2005

I have an unbound start-up form with a button that I want to open another form. When the user is done with the second form and clicks a close button, I want to bring up the first form.

Q. Is it best to leave the first form open in the background or close and re-open it? (And why?) :confused:

View 2 Replies View Related

Closing Forms As Others Open

Aug 31, 2006

To try to keep a sane user interface I would like to close forms as another form opens.

If I put a Command button on FormA that opens FormB and it is set to find a record on FormB ... how can I close FormA when FormB opens.

I tried putting DoCmd.Close either before and after the code that opens FormB and ...

If I put it before the code - it just closes FormA without opening FormB ... if I put it after the code, if opens FormB and closes it.

Is there a way of saying on a form 'close the form that just opened me'? (like in javascript where you can reference the form with window.opener)

Thanks for any help.

View 4 Replies View Related

Modules & VBA :: Forms Are Not Closing

Sep 11, 2014

I have a form which opens as a pop up when the system starts. On here are several buttons, which open other forms.Some of these just open another form and the user starts using the system, other close that form and open another one, and take go further into the structure of the system, then the forms that open have the same etc.For each of the buttons the code is very similar..For forms that open another one and don't close the main form:

Code:
Private Sub cmdescalations_Click()
DoCmd.OpenForm "frmEscalations"
End Sub

for those that close the form:

Code:
Private Sub cmdStock_Click()
DoCmd.Close acForm, Me.Name, acSaveNo
DoCmd.OpenForm "frmMain_Stock"
End Sub

Just the main of the form it opens changes, and sometimes with ,,,dialog in the options if its required.The opening part works every time without fail, but the form doesn't always close and I end up with two forms open instead of one. If I close the newly opened one and press the button again it works fine. This is purely random and only started a few days ago, up until then it has been working fine.

There is a hidden form that is open as well when the system starts, which check for something on a timer event every 60 seconds. If that event is firing would the focus shift to the hidden form, between me pressing the button and the event firing and the hidden form is getting closed? then the new form opening?

View 2 Replies View Related

Closing Datasheet Forms Within Each Other

Nov 23, 2012

I've got a Datasheet form which has a Datasheet Subform within it. By default, none of the subforms display, and the user clicks the "plus" on the leftmost column. What I'd like to do is prevent a user from having multiple subforms open at once. Basically, when the user clicks to open another subform, the first one closes.

How can this be done?

Also, is there a way to do conditional formatting (either using the wizard or with vba) on datasheet forms?

View 11 Replies View Related

Forms :: Closing A Query From A Form

Dec 24, 2014

I have created a form with buttons which runs queries. The parameters I need for the query are being passed through just as I wish and the relevant query is run correctly. However, if I then press the button on the form with different parameters I get the results from the previous query. I can only solve this by closing the query before pressing the button. Is there an easy way to close the query to prevent this from happening. In case this is relevant, the only data which I am returning from the query is stored in the windows clipboard.

View 6 Replies View Related

Forms :: Closing Form With Subform

Jul 8, 2014

I have a form with a subform. There is a close button on the main form which I have applied a key command of Alt + c and when the focus is on the main form it closes the form as you expect. But if the focus is on the subform, using Alt+c does nothing. I am trying to give the user a way to avoid using the mouse (so they do not have to click on the button from the subform. Also it is confusing that the key command doesn't always work in the view of the user, and in reality he is on the subform.)

So my thinking is:

1. Can I create a close button on the subform (and give it the key command of Alt + c) and in the code close the form and subform, if so - how to I refer to the form/subform?

2. Is there some way to apply the key command of Alt + c on the subform to activate the close button on the main form?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved