Ian
Thanks for the pointer. I managed to work it out by looking at the on-line help and after pulling out more than several strands of hair!!! here's the code that made it work:
Dim Menu As Variant
Dim ctl As Variant
Menu = "Global Menu"
Set ctl = CommandBars(Menu).Controls("&Timesheets")
If...
Good morning all
I have a database which uses a custom built menu and not any of the Access standard menus. When a user starts up the database he/she is required to login with a username and password. When logged in the permission level for the user is retrieved from the table and stored in a...
Hi there
Sorry I don't know what varibales are either!! Anyhow try creating a public variable in a module:
Public MyVar as Boolean
Having a public variable will make it available to all of your objects in your database.
HTH
Rob
MS SQL Server and Oracle are the most common database applications in use today.
Like Travis has said VB is not a database application but a development tool that will allow you to build custom .Exe applications which can make use of ODBC, ADO etc to connect to external databases such as SQL...
OK here's an interesting one
I have a combo box on a form which queries a table called tblEmployees. Basically it displays a list of employee names. Now this list is in no order so it displays names as they are listed in the table. In the table itself I have the field 'Name' which contains the...
Hi guys,
Yeah pcs you're absolutely right, it's always a good idea to split a database regardless if it's for multi-user use or not.
What I was referring to was if the person using the database on a stand alone basis was the developer as well. Generally what I do when I'm developing a database...
Hi Rachael,
Unless I'm misreading your post I can't quite see the point of having a split database on each user's pc i.e. front end and back end
Normally you would split a database in a multi user environment, the back end tables residing on a network server and the front end on each pc. You...
Hi
If you want to declare a variable that is available in the whole of your database then in the database window goto Modules and create a new module. To declare a public variable use this code:
Public yourVariable Name As Integer,String etc...
If you want to declare a variable that is only...
I have a database that is split into a FE and BE. The BE resides on a server without any restrictions i.e. open access and I have coded some simple security into the FE to restrict user access to certain forms and reports.
In the next few weeks I plan to add some more functionality to this...
Hi,
You need to place your code in a function i.e
Function yourFunctionName()
DoCmd.OpenForm "frmName", acNormal, "", "", acAdd, acNormal
End Function
You then need to assign that function to your menu command.
HTH
Rob
Hi Ruby
Between the If Me.NewRecord Then DoCmd.GoToRecord , , acPrevious line and MsgBox Err.Description line add this line of code:
MsgBox "This the last record"
That should do it for you.
Rob
Hi,
I believe this is run-time error no. 3022. Basically what this is telling you is that you have entered some data into a field that is already stored in the database in a previous record.
This error will occur if the design of your underlying table contains fields that have their Indexed...
I suggest doing it in reverse and testing for a null:
If IsNull(Me.TermDate) Then
Me![field].Visible = False
Me![TermDate].Visible = False
Else
Me![field].Visible = True
Me![TermDate].Visible = True
End If
HTH
Rob