Closing A Subform

Feb 14, 2005

Hello,
I need to close a subform to update the controls on it (deleting and adding), and without closing the main form; without using the "visible" propriety.

Thanks

View Replies


ADVERTISEMENT

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

Forms :: Go To New Record On Subform After Closing Pop Up Form

Jul 9, 2013

I have a form (frmAuditEntry) that includes a subform (sfrmAuditDetail). The user will enter audit information on the subform. There is a check box on the subform to identify containers that had errors in selection. When the box is check by the user, a pop up form opens where the user can enter the details regarding the type of error. The audit number and the container ID are carried over from the main form to the pop up form to link the information.

This is the code I have in the AfterUpdate event of the checkbox:

Private Sub Errors_AfterUpdate()
Dim rs As Object
Dim strBookmark As String
strBookmark = Me.ContainerID
Me.Requery

[Code] ....

This works great and keeps the focus on the record the user checked having errors so the right information transfers tot he pop up form fields. When the pop up form is closed, the focus goes back to the subform but keeps the focus on the container ID control of the record that the user previously checked as having errors (hope that makes sense).

What I would like to happen is this: When the pop up form is closed, I want the focus to go back to the subform but to go to the last blank record on the subform (if the user moved off the record before checking the error checkbox) or go to a new record (if the user did not move to a new record already before checking the error checkbox).

View 1 Replies View Related

Forms :: Refresh Subform On One Form While Closing Another?

Apr 14, 2014

I have two ways to enter work placements for students, I need to refresh a subform on one form while closing another.

The issue here is the form with the subform may not be open as mentioned above.

So is it possible on closing one form to refresh a subform only if it's parent form is currently open?

View 1 Replies View Related

Modules & VBA :: Checking Multiple Subform For Values Before Closing

Jan 29, 2014

I am looking to check 3 sub forms for values and if they contain any then delete them. After a bit of googling I discovered that you should use recordset.recordcount - to which I tried but I get method or data not found - is this a valid method?

My code to which Im using is:

If Me.NoneChargeable_Admin_subform.Recordset.RecordCount >= 1 And Me.NoneChargeable_Manufact_subform.Recordset.RecordCount >= 1 And Me.NoneChargeable_Research_subform.Recordset.RecordCount >= 1 Then
DoCmd.RunSQL "DELETE NoneChargeable_Admin.*, NoneChargeable_Manufact.*, NoneChargeable_Research.* " & vbCrLf & _
"FROM NoneChargeable_Admin, NoneChargeable_Manufact, NoneChargeable_Research;"
End If
DoCmd.Close acForm, "NoneChargeableHrs_frm", acSaveNo
End Sub

View 1 Replies View Related

Forms :: Subform - Input Box Reappears When Closing Database

Nov 13, 2014

I have a

- form called "Hauptformular" and a
- subform called "qry_tracking_Unterformular". Then there is a
- button called "cb_filialname".

Now when opening the Database, the form appears with the subform containing the
- query "qry_tracking"

When hitting the button "cb_filialname" the subform receives the contents of the
- query "qry_tracking_FilName", that has a filtering option on the Column "Filiale": "Like [Filialname?]"

Now the filtering works fine with the following Code:

PHP Code:

Private Sub cb_filialname_Click()Me!qry_Tracking_Unterformular.Form.FilterOn = 
FalseMe!qry_Tracking_Unterformular.Form.RecordSource = "qry_tracking_FilName"End Sub 

-> when you hit the button, the inputbox

Filialname?

appears.

The problem now is, that after having used the button, when I click the "Exit" cross right up there, the inputbox appears again.

View 2 Replies View Related

Main Screen Subform Based On Query Reflecting Changes Only On Closing Database

Jun 25, 2006

I have a problem in reflecting the updated changes on a main screen subform based on a query .These changes get reflected only after closing the access database and reopening it .Tried the requery command. Also made a macro to update the query and run it after the form opens or load but not reflecting change in main screen immediately .I would be grateful if I can get some help on this forumThanks

View 3 Replies View Related

Access Not Closing

Jun 13, 2005

Has anyone seem the problem when you close an access database and you think it is close but if you open the task manager you will see MSACCESS.EXE still running. Why ????

Jon

View 13 Replies View Related

Error When Closing

Feb 26, 2006

hi.

i'm getting an error that i can't source: "you attempted to open a database that is already opened exclusively by user so and so on machine such and such. try again when the db is available."

i'm getting this when i close the db. the default open-option is shared, not exclusive. this is a single home computer. it doesn't happen all the time but (too) often. any ideas to stop this? :confused: (i've seen a few threads that are all network-related).

w

View 4 Replies View Related

Better Way Of Closing My Database?

Jun 15, 2006

Current Situation:
Right now when I close a form it will save the data and close.

Problem:
When somone goes in and messes up on something and they just want to exit without saving they cant do that. The data could have been changed and one may not remember what it was!

Solution Ideas:
I am thinking that a pop up window that says "Save Changes?" Yes/No then have it save or not. Could somone give me the details on how to do this or anything else that would solve this issue. Thanks.

View 7 Replies View Related

Closing Database

Mar 27, 2007

Hi there

My Access Db is working perfectly fine. But when I close it , it pops up message box saying ‘Database already exist’.
Any Clue?

Thanks
Danny

View 6 Replies View Related

Closing Tables Etc Using VBA

Jul 11, 2007

I wish to detect is there any opened tables, queries, forms, reports, pages(item that may potentially locked the table), and close them automatically using VBA. How to do this?

View 2 Replies View Related

Closing Mdb Interfaces ..

Aug 26, 2007

Hi Friends,:)

3 small questions I need your help about ACCESS 2003 :

Note: I'm using a workgroup for users access through the network and the
.mdb located in PC as a server NO Front-end & Back-end .

1. Is there a software that can close the .mdb interfaces or forms in all
users PCs ? for design modification in case of a user left the work without closing the DB.
2. Could the users use the internet OR Intranet for fast or better access to the .mdb ?
3.In case of (Front-end & Back-end) strategy , How can I modify the forms since each user has its own ?


Kind Regards,,

View 8 Replies View Related

Closing Access

Feb 12, 2005

I want to put a button on my form which closes access i.e when i click it the access application closes and I go to desktop directly. Is there anyway I can do that.

Regards
Rahul

View 2 Replies View Related

Closing A Form Vs. Really Closing A Form

Feb 17, 2005

This is related to some advice I received some time ago <a href="http://www.access-programmers.co.uk/forums/showthread.php?t=64818">here<a>

I am runnign some code, it performs some applications, then, if a Count Field is greater than 1, a form opens as a dialog, displaying some information:

Dim A As String
A = "NewForm"
If Me.[Count] > 0 Then
DoCmd.OpenForm A, acNormal, , , , acDialog
End If
If Me.Continue = "No" Then
Exit Sub

End If

The new form opens, and you can either view it, and click continue, which will run the rest of the code, or you can click quit, which updates Me.Continue to "No", and then it exits.

The problem is, when it exits the Sub, it doesn't really stop the code, it just leaves things kind of hanging. When I try to run the code again, I get:

3321 - The database engine could not lock the table 'NewTable' becuase it is already in use by another person or process.

Another symptom - The original form where I click to start running the code, has two date fields. Normally, when this form opens, they are blank, but when I exit the sub, as above, the previous dates I entered are still sitting there.

How can I make the forms really close?

View 2 Replies View Related

Sort Without Closing

May 12, 2005

i have a continuous form, which on it i have an unbound text box which displays a calculated value. Now my form is sorted in descending order based on the value in the unbound text box.

Now, i would like that when i do some changes, i would like to re-sort the form in real-time i.e. not having to close and re-open the form. I thought of using the after update event of the unbound text box, but as far as i am concerned the after update event of a calculated "never occurs".

Is there any way, in which i can sort without having to close the form ?

Thank You

View 7 Replies View Related

Closing A Form

Jul 14, 2005

When a form is open you can also see on the task bar that the form is open
If the user right clicks on the form(on the task bar ) they get the following options minimize , maximise , close.

Does any one know how I can stop the user selecting Close please ?

View 6 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

Closing Access

Jan 27, 2005

I want it to make it impossible to close my access application (mde file) through
the normal way (the x on top must be shut off)

greetings
Koen

View 4 Replies View Related

Closing Access

Mar 3, 2005

Is there a way to close access from a form?

I know you can close the database, but is there also a way to close the entire programs with a button on a form?

Thx in advance,

Lion85heart

View 1 Replies View Related

Closing Of Form

Oct 11, 2006

when i close the form all the fileds in the forms gets saved to the table.
i want it should pop up before closing to save it or not.
i have a button on the form to save the fields in the table.
which has code

command23_Click()
DoCmd.GoToRecord , , acNewRec

View 6 Replies View Related

Closing Queries

Nov 3, 2006

If you've run a query, and still got it open on the screen, does that affect re-running it? As I just noticed mine retained the previous results. So I thought it would be sensible practise, to make sure any open queries are automatically closed. So I'm trying to include some code to do this via the form which calls the queries.

But the code I've written won't work. I get the following error - Method or data member not found (Error 461). Can anyone suggest how the code needs amending to work. I think I must have the syntax wrong.

I've written....

Private Sub Form_Load()
DoCmd.CloseQuery
End Sub

I was hoping this would close whichever query was active when the form was next loaded.

Thanks.

View 5 Replies View Related

Error When Closing Database

Jul 24, 2005

When closing an access database, I get the following error message:

"There was a problem sending the command to a program"

We recently had our server changed over. Is this an access problem, or their problem?

View 1 Replies View Related

Proper Closing Of Database

Jan 25, 2006

I recently created a database and installed buttons to properly close the database to avoid coruption of files etc. However I could not find a way to eliminate the X button in the upper right corner of access. Today my dbase crashed, I presume because someone did not use the buttons I installed, and just closed using the X in the upper right corner of access. The database is on a network, and was not password protected at the time. It will be when it is restored, however I would still like to know if there is a way to eliminate the x button in the upper right hand corner so that users will have to use the buttons created to properly close the database.

View 4 Replies View Related

Warning Before Closing The Database

Apr 18, 2006

Hi,

I was wondering if anyone might be able to help me out. Is there a way of programming the access database in such a way that it doen't shut the whole database if someone by accident, presses the cross sign which is right on the top right hand corner. I'd like it to ask the user if they really want to quit first. This way, all the unsaved work can be saved prior to the closing.

Is this possible?

Thank you in advance

View 2 Replies View Related

Error On Closing Application

May 19, 2006

When I exit my application I sometimes (about 1 in 5 times) get an error message (see attached jpg). This doesnt make any senese to me as I am closing my application NOT opening it. Is this happening because my mdb is corrupted? (I compact and repair on close)

View 3 Replies View Related







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