Hi, all. I am sorry if i do something wrong but it is my first time here.
Situation:
I have an application with a login form. Once you press the login button the login form is hidden (visible=False) to be able to pass the userid to another form. In order to close the application the user needs to press a button in the swithcboard but that is not possible because the hidden form.
Question: How can i close the hidden form to be able to close the application?
I have a Lost/Found property database which we use to keep record of the lost/found property and it is working fine.
As per our organization's policy, we keep the item(s) for up to three months in which if it gets restored to the owner then fair enough otherwise after three months the item(s) can be claimed by the "Finder". But for this very purpose we issue the Finder with a "Claim Receipt" which he/she should bring in when claiming for the item(s) after three months period. Therefore, It's just the right time to upgrade the database to a more professional level.
The database has one table and two forms.
One form (LostFoundForm) is visible to the user in which they enter data, this form has two sections; Item(s) & Finder's details and the second section is about Restoring details.
However the second form (ClaimReceiptForm) is hidden to the users (for manual data entry) and has only one section which is exactly the same as the first form's first section, i.e., Item(s) & Finder's details. This second form takes the data automatically from the first form because the table behind them is same and fields are same (please see attachment). Up to here it's all working fine.
I would like to introduce a Checkbox or a CommandButton in the LostFoundForm which when we click should pull up a msgbox asking "Do you want to print the receipt for this item(s)?" with a Yes/No option. On clicking "No" it should, obviously, settle down but on clicking "Yes" it should print the "corresponding record" from the ClaimReceiptForm.
I have an extremely complex database that requires 12 forms to remain open simultaneously. A command macro successfully opens all 12 forms, but 3 of the 12 are hidden from view because the window does not have enough room to display all 12. Even when I use the left / right arrows, these 3 forms are still partially hidden. How can I ensure that none of the tab controls are partially hidden behind other tabs ?
I wanted to send a message to the person who created this sample database with a modification query but I don't have enough posts to do this, so my message would not send.
The below sample database called Sample - Use Hidden Form to Log Users ,URL...
I would like to add to my database. Any way to modify the form/code so that I can log more than one form? I have 5 forms that I would like to log user in and out of but I dont know how to adapt this to do that?
I have a button using a macro to open a form in Hidden mode. Then I have another button on another form to open this form that was hidden.
When I open the form, the form is virtually blank apart from the form caption name. But when I close this and press the button again the form opens as normal.
I do not understand why?
I was told that once you hide the form and when you open the form again, it should appear normal. Why do I get this blank form??? Only by hitting the button again then the form is normal....
I have a form with a button that pops up a datasheet with a number of records. I need the dbl click event to populate a hidden text field with the id of the item that was double clicked.
Ive found the double click even and can get the double click to close the window, but i need to populate the text field as well.
I have a split form that's like a list of pending tasks. The data source is a linked SharePoint 2013 list where users submit requests. The user takes the information from each record and performs an action. When it is done, the user presses a button and the task status changes from "Pending" to "Processed". The form record source is based on a query that finds only records with a status of "Pending" so when the user changes the status of the task, it is removed from the list. It works fine except when there is only one task left in the work list. If the user processes the last task, the form refreshes and it goes to a new empty record and I get an error message that says I must enter a value into one of the required fields. I tried making the field non-required but it just creates an empty record in the table.
I am using the method from allen browne [URL] .... to open a form and add it to a collection and when removing it it closes. actually, usually it does work so but i have now a form which does not close until i am hitting the reset button in VBE , is there something i could check why it's not functioning as desired ?
Just to add, this form has a subForm as well (might be the cause ?)
I have a timer form which closes the database after a period of time with DoCmd.Quit. Another form is open at this point but if a user has left it in the middle of editing it I want to be able to save the record in the other form and close it before the timer form closes the database.
What VBA do I need in the timer form to save the record and close the other form before DoCmd.Quit? Just to be clear the code is...
Private Sub Form_Timer() On Error Resume Next Me.Tag = Val(Me.Tag) - (Me.TimerInterval / 1000) Me.Caption = "The database will exit in " & Me.Tag & " seconds" If Val(Me.Tag) <= 0 Then
When the user clicks to close the form the Before Update event runs, and has the following code to check that all the required fields are completed:
If IsNull(Me.ToxReceived) Then stdresponse = (MsgBox("You must enter the toxicology received date before continuing." & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ "Do you want to do that now? Click YES to return to complete the form, click NO to undo the record", vbYesNo, "Missing Data"))
If stdresponse = vbYes Then Me.ToxReceived.SetFocus
Else Cancel = True Me.Undo Exit Sub End If End If
If the user clicks no, and the record is undone, how do I get the close form event to still continue?
i put a button that run the command "docmd.close" but i found when i click it it close the form but with saving all data in field in the table, but this button should cancel record insertion, i hope i can find the answer here.
I have a form that I want only to be opened from another form (i.e. the user presses a button from form1 and form2 is magically displayed).
My solution: In form2, I check to see if form1 is open in "use" mode. If not, I display a message and close form2.
The problem: The close code (docmd.close) is at the beginning of Form_Current. Apparently, Form_Current doesn't like to be interrupted. I receive a run-time error 2585 (This action can't be carried out while processing a form or report event).
Ok, so, umm, how exactly am I supposed to close the form? I tried the check during Form_Load instead, using the cancel variable instead of the docmd.close. However, I don't think this code got executed. It's almost like the form was already loaded or the Form_Load occurs after Form_Current (In my handy chart here, it says that Form_Current occurs when a form containing data is first opened and when you move to a different record.. so, I suppose it is possible).
why a form won't close. Each time I try to I am prompted to save and when I do, the form doesn't close. When I closed the DB and reopened, none of the changes were saved.
Hi, I want to have some queries run during the database is closed, like the functiona with "Repair on Close". But I don't want to use a form with a VBA code doing it. Is there any other possibility to do it? :confused: Thanks in advance for answers.:)
I've got a database with a linked table to a CSV file which is automatically extracted from some logging software. The Database is used to search for text strings (e.g. "example") within several fields wichin the automated extract and then show the results with any duplicated instances taken out (via an append to table query which is indexed with no duplicates).
So:
Text is entered FieldA is looked through for a match, if a match is found the whole record gets appended to the Append table. FieldB is looked through and if a match is found the whole record (including field A) is appended, however if the match has already been found in A, then the record is not copied. It does this for several fields and then you get a table which is every record containing the searched for text with no duplicates. This table is then displayed as a subform on another form in it's "table" view.
The form I'm trying to close is the form which contains the above subform.
I've tried:
A macro with close -> form -> formname which doesn't work. Code: Private Sub Toggle2_Click() On Error GoTo Err_Toggle2_Click
HOWEVER, just to make things interesting, if I click to view the form design, then run the form again, it will close fine using either method. It just seems not to work on the initial run of the text search which then opens the form displaying the subform.
I have a form that is loaded through a hyperlink from another form. On this form I have placed a command button which closes the form (DoCmd.Close) I have also used the full syntax including form name and no save prompt. When i close this form using the command button I get a request for two paramter values that are used in queries in this form (I don't want this to happen) when I click the close button on the control box "X" this doesn't happen also it doesn't happen if I use file close. This problem only occurs on some of the slower machines in my workplace, any suggestions would be greatly appreciated. The is one combo box on the form in question which is set to run a macro after update, this macro requeries the 52 list boxes on the form.
I am building a database to track employees. I have a form to input the personal information and want to close this form and open a new form to input the employee's training information. I have a cmd button to open the Training form for the individual, however I can not make it close the employee input form.
how do I make a form closure password protected? basically a customer will be using a a form to browse products and the only way to have access to the rest of the DB is to enter the correct password to close that form when a close command button is clicked (more security features protecting rest of DB) how do I go about this? or is there a better way? explanation of any code will be very much appreciated! thanks :)
I can't seem to figure out how to close current form. I have form1 and I open form 2 from form1. I can't figure out how to close form1 when form2 opens. Any help would be greatly appreciated.
Hi all, I have a small problem.... Assume we have a form called formX with a button on it, clicking this button will open another form called formY, I know how to do that..... But what I want is when I click that button, formY to be openned and formX to be closed at the same time..... Thank you in advance, and sorry for bothering you......
HI basically i have a form which dislays records in a continous list, then an add button which adds records to the list. to view the newly added records you have to close the form and open it again.
I have inserted a refresh button but what im after instead is when i close the 'add form' it refreshes the list form. Below is the code for the refresh button could someone tell me what i need to add/change to make it refresh a particular form on close?
Private Sub Command45_Click() On Error GoTo Err_Command45_Click