Modules & VBA :: MDB Closes Properly But MDE Does Not
Jun 19, 2014
I created an MDE file for my application it's a split db when I hit the exit command button on the MDB version it quits the application correctly but when I do the same thing on the MDE version, it leaves the database window open on the taskbar.
View Replies
ADVERTISEMENT
Aug 27, 2013
I have a combo box that contains a list of values, but users can add their own if they choose. If the value they type in isn't on the list, the Not In List event fires. Once the procedure is done, the form inexplicably closes.
Oddly enough, it only closes under certain circumstances - the code provides several different options for saving the new data, and if I choose different options, the form works as its designed.
Further, if I insert a breakpoint anywhere in the code, then hit F5 to let the code run, the form works fine. Literally, the breakpoint can be anywhere in the procedure from the first line (On Err...) to the last line in the Exit block, "Exit Sub".
View 12 Replies
View Related
Sep 18, 2014
DoCmd.TransferSpreadsheet Range parameter.
I want to import from an xls-File just the second page, titled "Harte". How do tell this the compiler?
Code is:
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel8, "Harte", file, True, "Harte"
View 1 Replies
View Related
Aug 7, 2014
We use our CRM for entering client orders, which is done through our 'OrderEntry' form. On that form we have a subform that we use to enter order lines - as we have a range of products on offer, an order can be made up of one product or anything up to 100.We have an 'amount' textbox on the subform, that the users enter the cost of each line, and as they add more lines the total cost of the order is calculated using a textbox in the subform Footer, with the ControlSource set to =Sum([amount]).
On the main form, we have a Net textbox, that the user will add in the total cost of the order once they've added all the order lines, and providing the =Sum([amount]) textbox on the subform matches the figure in the Net textbox, a button to Proceed the order and go on to the next step appears.
The intermittent problem I have, is that the OnCurrent event I use to show the Proceed button does not seem to fire on its own - but when I stop the code and step through it, it will show the Proceed button without any problems.Here's the code:
(the Proceed button is referred to a 'Command80')
Code:
Dim OS As String
Dim UT As String
OS = OrderStatus
UT = fGetUserType
[code]....
I've made the part that refers to the Proceed button bold, but thought I'd add in the whole OnCurrent event in case there was anything in there that was blocking it.
I added in the MsgBox code at the bottom to make sure the OnCurrent was firing, and that works fine.I've searched through the rest of the code, and there's nothing else in there that references the Visible property of the button.I've been through the decompile process detailed here, and also been through this similar thread with a fine toothcomb and this still won't work.
I've saved the form out as a textfile and then imported it back in, both through the immediate window, and short of importing everything in to a new DB and starting again
View 14 Replies
View Related
Feb 10, 2006
I run several databases daily - after running two of them (at different times), the database itself closes but the Access program stays open. In order to close that program, I have to close it out using the Task Manager.
Any suggested solutions? Thanks (as always) for your assistance.
Bob
:confused:
View 1 Replies
View Related
Oct 10, 2006
What would cause Access to suddenly close without warning while busy with a query?
No error messages, nothing! The query is a fairly big one that normally takes about 6 minutes to run, but has had no problem with it for a number of years. A new drive used for back-up purposes was recently fitted to my PC which now has 3 internal hard drives.
Could this problem be caused by a bad memory handling configuration? The original setup that worked before may have been changed when the new drive was installed. The XP Page File size for example may have been changed.
Any advice would be much appreciated.
View 2 Replies
View Related
Feb 8, 2005
I created a form with an "exit" button and a "return to main menu" button on the form. but when I am on the last data and press tab the form closes automatically.
what could be the reason. Do I have to put some condition on the macro I have created for the two buttons listed above. I have just put "action" without any conditions on both the two buttons.
View 1 Replies
View Related
Jul 7, 2006
I have a form that records when a user edits a record. This change is only recorded when the user clicks the "update record/save" command button. What I need help with is capturing the changes made when a user edits the record in any field and doesn't click the save button upon closing the form. If the user doesn't edit any fields in the record, a new instance of this edit will not be saved to my edited records table and the form just closes
View 2 Replies
View Related
Dec 12, 2006
i want to send an id from 'job' to 'job1'.
the job form needs to be closed before the job1 form opens..
i want to do something like this..
job form
Private Sub Form_BeforeUpdate(Cancel As Integer)
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
DoCmd.OpenForm "job1"
End Sub
and then on job1 open event use
Me.txtjobref = Format(Forms!job.jobref, "00000000")
the problem is that the job form will be closed so how can i transfer it?
View 14 Replies
View Related
Nov 14, 2014
I am trying to set the focus back to page 1 of TabCt186 when pop up form frmEditWorkItem closes on clicking a command button.
I have been trying with this line of code but keep getting asked for an object required.
Forms!frmReactiveTracker!TabCtl86.Pages.Item(1).Se tFocus
View 4 Replies
View Related
Jan 10, 2007
I have an access2000 db. Many tables, forms, reps ect... at random times it will just close. Don't know why. No errors, no reason why. It just closes. Is this common and is there any fix?
View 3 Replies
View Related
May 30, 2007
Hi All,
I've searched for ages looking for threads on backing up a database, and even found one which was asking exactly what I need but without solutions given.
I have a split database with BE and FE, which is used by about 20 users. When the last user closes the database I would like the database to be automatically backed up (e.g. when no one is using it). I've found threads on scheduling a backup, it the middle of the night for example, and other threads on backing up while users are logged on, but I'm not really keen to use these approaches.
Any ideas??
John
View 4 Replies
View Related
Mar 5, 2005
How can i control what happens when a form is closed.
Say for example if no order lines have been entered on a sub form, the record is not saved.
Also how do you remove the default access error messages about null fields, and replace it with something more user friendly.
View 1 Replies
View Related
Oct 26, 2013
I have a main form populated by Dlookups.When I click on a textbox I open another form which is used to change data in my main table. Once this is closed the main form is still displayed but the amended data isnt reflected in this form. How do i get the data to change, I have tried requerying the form and the query that is used for the dlookups but I cant get it to work.
View 5 Replies
View Related
Dec 19, 2005
Hello Ladies & Gentlemen,
I was trying to access this particular MS-ACCESS file which serves as a DB for a software. But the file opens and closes in a split of a second and was impossible to view its structure. :mad:
I beleive it's made to respond so by the programmers in order to hide the content. Can anyone please help me open this file? PLEASE...
Teddo
View 8 Replies
View Related
Apr 19, 2007
Need some help on a command which would close any on screen active form. I want to have this Esc key enabled as an autokey to close any screen active form. I know how this autokey thing works but unable to figure out proper code.
thanks
View 6 Replies
View Related
Aug 14, 2007
Hi All,
I have a pop up form that requires me to fill out all 4 fields of the form. When I don't, I get a prompt telling me which field(s) I've forgotton to fill in and allows me the option to Cancel (Yes or No) and if i decide yes it wont save and will close the form. BUT when I say No (Don't cancel), it still closes out the form and I obviously don't want that. I don't know if it might have to do with my macro button either? Any clue?
Thanks in Advance!
MY CODE:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim blnError As Boolean
Dim strError As String
strError = "You are missing data for "
If IsNull(Me.[Account Number]) Or Me.[Account Number] = "" Then
blnError = True
strError = strError & "Account Number,"
End If
If IsNull(Me.Contact) Or Me.Contact = "" Then
blnError = True
strError = strError & " Contact,"
End If
If IsNull(Me.Department) Or Me.Department = "" Then
blnError = True
strError = strError & " Department,"
End If
If IsNull(Me.Address) Or Me.Address = "" Then
blnError = True
strError = strError & " Address,"
End If
If blnError Then
strError = Left(strError, Len(strError) - 1)
If MsgBox(strError & vbCrLf & "Are you sure you want to cancel." & vbCrLf & "If you do, the info will not be added.", vbQuestion + vbYesNo, "Close Confirmation") = vbNo Then
Cancel = True
End If
End If
End Sub
View 6 Replies
View Related
Feb 28, 2008
I have a database that has been functioning very well for nearly a year. Suddenly today, as I attempt to open a report (very complex report takes about 2 minutes to render), the database closes before displaying the report. I have moved the db from the server to my desktop and the same problem happens. It does not matter if I try to execute the report from the switchboard or from the Report Object List.
DB is 344,940KB. I have larger db's that work fine.
I don't know where to look for a way to stop this from happening. Nothing was done to the form design between the last time it worked properly, and today.
Any thoughts are welcome.
Thanks,
George
View 4 Replies
View Related
Mar 27, 2008
I have an application that when in design master shuts down when I attempt to open a certain form. I have traced the problem to a linked field from another table, by creating a new form and ommitting the said field, problem is its a required field!
If I copy the database (Backup) and run it as a replica it does not happen, if I then convert the replica to design master it happens.
Any suggestions please??
Steve
View 1 Replies
View Related
Apr 14, 2008
Hi,
I want all the tables of my database to export to a zip file when the users exit the database. this will serve as a sort of a backup of the data. Is this possible? if so, how?
Piet
View 4 Replies
View Related
Feb 20, 2008
I am having a problem running Access 2007 runtime on a workstation. I have set up the 2007 database (.accdb) on our server and am able to connect to it and open it from the pc that has Access 2007 full version installed and it works fine.
I also installed Access 2007 runtime on another PC and was able to open the database using the runtime version just fine.
However, on this other PC, I installed the runtime version, and when I use the command line (msaccess.exe /runtime \serverdirectorydatabase.accdb) to open the database in runtime mode, Access opens for a split second and then closes immediately.
When I just run msaccess.exe, it opens the runtime version and says that I have not specified a database, as expected. So, I am wondering why it is not opening the database when i DO specifiy the database.
If i specify an incorrect directory for the database, it opens the runtime version and a dialog appears telling me that a database was not found, and upon clicking OK, the program closes.
I can say, that when I run it off the computer that works through the runtime version, I get a security warning telling me that there are potentially unsafe elements in the database, but i just have to click OPEN and it still opens it fine.
Perhaps the non-working PC is denying it access due to these security issues?
I can't seem to figure this out, and any help is appreciated.
View 8 Replies
View Related
Nov 3, 2005
I've got a database, which has been working fine for the last 6 months, it's nt spectacularly large, or complex (abotu 10mb, 15 tables, (5 of which are lookups), about 20 forms, 40 reports, and 30 or so queries).
I've tried to add a new query today, again nothing special:
all comes from one table:
column 1 - group by
column 2 - max
column 3 - if = "No"
column 4 is an expression: iif (a=1,col_a,iif(a=2,col_b,iif(a=3,col_c, .... ))) and so on for 8 col_*'s
The query creates happily enough, and is viewable.
When I try to save it, access shuts down completely with no warnings.
creating the query apart from the last column, saving it then works, but on adding the final column the database shuts down every time.
any ideas? I'm at a loss on this.
Cheers
Kev
View 2 Replies
View Related
Jan 12, 2015
Access database 2007: I have a database with some forms init but when i type my username and password to open the main menu to insert data the form shows 1 second and closes the whole database. I don't know whether the problem is the VB code or the microsoft.
View 14 Replies
View Related
Jan 23, 2014
Every time I re-open Access 2010 it pops up stating the following with a blank text box:
"[Forms]![Frm_system]![sub_frm_invoices].[form]![invoice_id"
I hit ok and the usual invoice_id param text box message box appears again.
Once that is over, I gain access. I can browse to the form - frm_system, open the sub-form sub_frm_invoices and remove the invoice_id field. Once I re-add it everything works fine (until I close the application).
I initially thought it was because the database was set to "compact on close" but I disabled that and it is still occuring .
I know this is the cause but as the sub-form itself uses a table record-source I know the field exists - not to mention I can simply delete and re-add it to fix it temporarily.
This behavior occurs when a field, a criteria, an expression, or a control in a query, a form, or a report references a name that Access cannot find. For example, a name could be misspelled or a field may not be available within that scope.
Basically it looks like the textbox displaying the invoice_id on the form is the problem. I can't figure out why though. When I remove it everything works - the queries work if I recreate it as well..
View 1 Replies
View Related
Jan 26, 2005
Need help and advice desperately,
I am trying to update about 10 tables each time a visitor visits my site..
however there are often missing counts, meaning the total data in each table are not the same frequently They are supposed to be since all the tables get updated each time.
Im using MS Access 2003.
What could be the problem?
Below is an example of one of the function that updates one of the tables in my DB.
************************************************** *****
function GetIdRes(sName)
'Get ResID
sUserID = Request("UserID")
sSQL = "SELECT ResID, ResName, Total, UserID FROM Resolutions WHERE UserID = '"&sUserID&"' AND ResName = '" & sName & "'"
rs.Open sSQL,,,adCmdTable
if rs.eof then
rs.AddNew
rs("ResName") = sName
rs("Total") = 0
rs("UserID") = sUserID
end if
rs("Total") = rs("Total") + 1
rs.update
GetIdRes = rs("ResID")
rs.close
end function
************************************************** ****
I've got another 10 similar tables. The Column "Total" is often different among the tables.
Please kindly advise...
Thanks
View 2 Replies
View Related
Nov 18, 2005
Hi,
When i use this
between #01/07/2005# and #01/09/2005#
It all works ok and pull outs what i need.
But when i do
between #01/07/2005# and DateAdd("m",3,#01/07/2005#)
I have also tried it without the # and with 2 instead of 3.
No luck :(
Any ideas?
Thanks
k0r54
View 11 Replies
View Related