Hello to everyone!, Could I ask a help how could I possibly code MS Access Startup to set the MenuBar, ShortCut Menu, FormMenu, Special Keys to OFF to prevent user from using these keys when my application starts?
I have a problem where i unchecked the "allow built in toolbars" , "allow toolbar menu changes","allow full menus" and " allow default shortcut menus" from the TOOLS Menu item (STARTUP) How do i get back all the menus to show when the application starts up?
I have a database that will be used by a few users who are not very comfortable with Microsoft Access. I have a login screen and a introduction/splash popup. I was wondering if it is possible to bypass the Microsoft Access pop-ups that ask the user if they want to "block unsafe code.." or The security popup that says "This file may not be safe" so that the users go right to the login screen I created within the database. I am worried that there will be variations in answering/clicking these Microsoft Access questions thus causing a variety of complaints when trying to access the database. Thank you
Hi I've just moved my PC over to Office 2007. I have previously created an application in A2003 that consists of three databases which I move between frequently using command buttons running the following code to close the current one and open the new one:-
Private Sub Command14_Click() Dim RegSet As New QwestLib.QRegistryFunctions On Error GoTo Err_command14_Click
Application.Quit acQuitSaveAll Exit_command14_Click: Exit Sub
Err_command14_Click: MsgBox Err.Description Resume Exit_command14_Click End Sub
In 2003 this worked fine but we always had to enable macros on opening the new one. This is now not required as the application is "Trusted" but in A2007 every time a database opens the "Getting Started with MS Access" window opens.
Is there some way I can switch this off as it is unnecessary and time consuming.
I'm trying to migrate an Access 2000 project to Access 2007. I want that the frontend doesn't look like Access. This means: no ribbons, no office button, no Quick Access Toolbar, no database panel. In 2K, this was rather simple, but in 2007 I only managed so far to get rid of the ribbon (by replacing it with a blank ribbon) and the navigation pane, but I can't figure out what to do to hide the Office button and the QAT. Can anyone help me with this ?
I thought I had this figured out, but apparently am still missing something...
When I start my DB, I get the default 'Security Warning' message every time asking if I want to cancel or continue... I thought this was an options setting under the Tools/Macro/Security setting. However, when I change this setting (default is Medium) to Low, exit Access and restart the DB I get the same warning message and the security setting is back to medium.
Am I in the right area to fix this? Why would my settings default back?
I'm trying to migrate an Access 2000 project to Access 2007. I want that the frontend doesn't look like Access. This means: no ribbons, no office button, no Quick Access Toolbar, no database panel. In 2K, this was rather simple, but in 2007 I only managed so far to get rid of the ribbon (by replacing it with a blank ribbon) and the navigation pane, but I can't figure out what to do to hide the Office button and the QAT. Can anyone help me with this ?
Sorry if this is a really dumb question - I have just started using Access and I couldn't find the answer to this doing a forum search.
I have made a database consisting of a table and a form. All I want to do is get the form to appear automatically when the database is opened. I am using Access 2007.
I know that I can startup MS-Access manually and bypass the startup options, including any macro that is set to run automatically, by holding the Shift key down when launching the application. I have:
Code: Public Sub AccessStuff() Dim myaccess As New Access.Application myaccess.OpenCurrentDatabase(" orfs006slsops_repts\_RS DevSOPSOP.MDB") Dim db = myaccess.CurrentDb() End Sub
which works nicely and opens the database just fine. However, this mdb has a startup macro defined in it. I can't hold down the Shift key since I'm doing this from a program. In this case, how can I bypass the startup macro?
Thought I best ask this question BEFORE I run into trouble.
If I were to set my database to hide the database window and all menus on startup so that users can only do what I want them to do and not edit anything. How do I go about reversing this if I needed to edit something as I would not be able to see any of the regular menus?
It would be good if the solution involved some sort of admin password rather than a sneaky short cut that a user may accidently stumble across.
I wanted a Switchboard page in Access to open automatically when the database was opened. I've done that but, as I did it, while in the Tools/Startup to set Display Form Page (in this case a switchboard page but it's not opening full screen and I ow have no way of editing anything), I stupidly de-selected the options there... Display database window, Display status bar, Allow built in tool bars allow toolbar/menu changes.
Now I have lost the tools Menu, the View Menu and others (where one sees, File, View etc at the top of the window) and I can't work out how to get them out. I can no longer view my Access pages in Design View so I can't amend the any pages.
Can anyone tell me how to get my View and Tools menus back on my Access app window?? It's a bit of an emergency... been up all night and have to hand this in as coursework at uni in about 3 hours and I've screwed up right at the end and can't do the last couple of things before putting it on a CD for my tutor to mark.
Help!
I'd also like to know how to get it to open the first form at full screen.
I am trying to display only my form on startup. Tools-Startup allows you to eliminate"Database window" default menu and toolbar but I can't eliminate "Microsoft Access" window.
I don't know if there are other settings that I am not aware of or there has to be code built.
I've been using the following code successfully in Access 2003 & now I need to migrate to Access 2010. The purpose of the code is to use the items that the user selects in the list box to build the criteria of a query. Access 2010 keeps giving me a syntax error when I try to run the query & I don't know why:
My code is:
On Error GoTo Err_Command151_Click
' Declare variables Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim varItem As Variant Dim strCriteria As String Dim strSQL As String
[Code] .....
The syntax error I get in Access 2010 is:
Syntax Error in query expression 'SELECT * FROM qryContractListSummarybyDateContract3TYPEBREAK WHERE qryContractListSummarybyDateContract3TYPEBREAK.Rep ortableName IN('Adbri Masonry NSW');'
Iam using the following code for inserting the values from access form in to the access database table ITEMS, but iam getting compile errors, may i know where iam going wrong in the code.
Also help me in updating, deleting and viewing of records from database table ITEMS to the form when i run the program.
Following is my code :
Private Sub ADD_Click()
On Error GoTo Err_ADD_Click
Dim cn As ADODB.Connection Dim rs As ADODB.Recordset
Set cn = CurrentProject.AccessConnection
'Create an instance of the ADO Recordset class, and 'set its properties
Set rs = New ADODB.Recordset With rs Set .ActiveConnection = cn .Source = "SELECT * FROM ITEMS" .LockType = adLockOptimistic .CursorType = adOpenKeyset .CursorLocation = adUseServer .Open End With
'Set the form's Recordset property to the ADO recordset
I've got 2 sub forms that I intend on using via a toggle button from my primary form to access them. Is there anyone that can give me a heads up on creating vb code that when OnOpen it will automatically advance to a new record for data entry? I want the form to keep anyone from accidentally changing existing info in that regard. I'm still really new with VB.
I dont get any errors with this code. Let me explain what im doing: T1 = temparary table (not really temparary but the values just change so often it might as well be) this table has field names: partname, order, maxorder, etc. stuff like that pretty much its a table that has records for each part name.
T2 = main database this table holds the order for all parts for a particular time and day
T1 is the one that people are familiar with, where as T2 's set up is something that they would not be, so for clarity we use T1 for displaying etc.
now my problem is, i try to transfer data from one table to another but it works sometimes and doesnt work others, i dont get any errors and i have option explicit on as well. if someone could look at this code and tell me if there are any problems that you see, the quicker the response the better.
technical specs: Access 2000 Windows 2000
Code: Private Sub insertRecMainDB(ByVal typeOfOrder As String) 'This sub will insert a new record of type O (Ordered) and put in all values from the table Order 'Also it will make a duplicate record of type R (Received) and put in same values so when later 'if there are no changes (meaning all product was received) no entry has to occur, however if you 'are missing a part then you can enter how many on the other form.
Dim yesOrNo As String Dim tempSQL As String Dim rec As New ADODB.Recordset Dim orderAmountRec As New ADODB.Recordset Dim partNameRec As New ADODB.Recordset Dim numOfRecords As Integer Dim cnt As Integer
'Checks the type of order and either checks or does not check it in the DB If typeOfOrder = "O" Then yesOrNo = "yes" Else yesOrNo = "no" End If
'Counts the number of parts we have to order, saves it in numOfRecords rec.Open ("SELECT* FROM [Order]"), conn, adOpenStatic, adLockReadOnly numOfRecords = rec.RecordCount rec.Close 'Loop to transfer data from the table Order to the table MainDB For cnt = 1 To numOfRecords
'Gets the name of each part tempSQL = "SELECT [Description] FROM [Order] WHERE [PartNumber]=" + CStr(cnt) + ";" partNameRec.Open (tempSQL), conn, adOpenStatic, adLockReadOnly
'Gets the amount ordered of that part tempSQL = "SELECT [MaterialOrdered] FROM [Order] WHERE [PartNumber]=" + CStr(cnt) + ";" orderAmountRec.Open (tempSQL), conn, adOpenStatic, adLockReadOnly
'Updates that part name with the ordered amount tempSQL = "UPDATE [MainDB] SET [" + CStr(partNameRec.Fields(0)) + "]=" + CStr(orderAmountRec.Fields(0)) + " WHERE [OrderNumber]=" + CStr(txtOrderNumber.Value) + " AND [DateTime]='" + CStr(lblDateTime.Caption) + "' AND [TypeOfOrder]='" + typeOfOrder + "';" CurrentDb.Execute (tempSQL)
partNameRec.Close orderAmountRec.Close Next End Sub
on a small scale this code works, but when my inventory table has all of the 2000 records it crashes, any ideas. I can ftp my database if needed
Code: Dim ColorDim StartPointDim RsItem As DAO.RecordsetDim RsNewItem As DAO.Recordset 'Grab the inventorySet RsItem = CurrentDb.OpenRecordset("select ItemId,Description1,description2,quantityonhand from item")'grab the table that will have the new item and description addedSet RsNewItem = CurrentDb.OpenRecordset("select * from newitems") With RsItem While Not .EOF StartPoint = 1Start:'find out if the last numbers is numeric or notIf IsNumeric(Mid(Right(.Fields!itemid, StartPoint), 1, 1)) = True Then'see if the start point is the last letter or notIf StartPoint = 1 Then 'meaning there is no colour indicated at the end of item Else'add the quantity and the color to the newItem tableColor = Right(.Fields!itemid, StartPoint - 1)RsNewItem.AddNewRsNewItem!Description = .Fields!quantityOnHand & ColorRsNewItem!itemid = .Fields!itemidRsNewItem.UpdateEnd If Else'move the startpoint to the next letter in itemStartPoint = StartPoint + 1GoTo StartEnd If .MoveNextWendEnd With
I have a form in access database. On click of a button I want to perform update process for records in a table "abc" in the same database. I have written the following code in the onclick function,
Code: Dim rs As New ADODB.Recordset Dim rsCount As New ADODB.Recordset Dim CntVal As Integer Dim con As New ADODB.Connection con.Provider = "microsoft.jet.oledb.4.0" con.Mode = adModeShareExclusive con.Open ("C: est.mdb") rs.Open "Select * from abc" Do While Not rs.EOF rsCount.Open "select count(test) from abc where test = '" & rs.Fields("test") & "'" If Not rsCount.EOF Then CntVal = rsCount.Fields(0).Value Else CntVal = 0 End If rsCount.Close con.Execute "Update abc set testcount = '" & CntVal & "' where ID1 = '" & rs.Fields("ID1").value & "'" Loop
In the above code, I am not able to use the command, con.Open (App.Path & " est.mdb"). It gives "Object Required Error". And while opening the con object I get the error "You attempted to open a database that is already opened exclusively by user 'Admin' on machine ''. Try again when the database is available."
I have a form that is created in Access but uses some VB code. Here is my problem..... I have one form that the users do money transactions on. Then I have created a form that will allow them to Void a transaction as well as Refund a transaction. On the Void/Refund forms it will query the user for the Receipt No. once that information is pulled in, there is a command button that says "Void Ticket Sale" on the Refund form it says "Refund Ticket Sale". What I'm trying to do is, once the user enters the receipt no and hit that Void/Refund Ticket Sale button - if it has already been voided/refunded, a message box will come up and say "This Ticket has already been voided/refunded". If it has not, the "Void Ticket Sale" command will carry on. Here is a snippet of my code, I'm not sure what I'm doing wrong.
Private Sub cmdRefund_Click() On Error GoTo Err_cmdRefund_Click 'this is a AddRec button, caption was changed to read Void
Dim Answer As Integer Dim Result Dim sqlstmt As String
sqlstmt = "Select Count( * ) from tbl_transactions where PaymentType = Void And VoidRefundID = Me.TransNumID"
Answer = sqlstmt
If Answer > 0 Then MsgBox "This Receipt No. has already been voided." Exit Sub Else
Result = MsgBox("Are you sure you want to Refund Receipt No " + Str$(Me.TransNumID) + "?", vbYesNo, "Refund Receipt")
If Result = VbMsgBoxResult.vbNo Then DoCmd.Close Exit Sub End If End If