Modules & VBA :: How To Set The Active Window
Mar 30, 2015
I have created a form that will print the active report. I have managed to make it look for the active report, but it won't find it because there's no report active, even though I have the report open. How do I make my report be active when I open it? (In a way that whichever report I open will become the active window so that my form will e-mail the report that is currently open)
View Replies
ADVERTISEMENT
Jun 13, 2006
I have an Access 2000 application which, on startup, always launches a 'switchboard' form and sometimes gets information from the user during the startup. Both forms are opened with VBA using DoCmd.OpenForm; the switchboard opens as acNormal and the input form (when used) as acDialog.
Under normal circumstances this works fine.
If, however, the Access window ceases to be the active window in Windows (e.g. the user selects another application's window in the taskbar) the forms do not open (all other VBA code runs correctly).
Any ideas?
Simon
View 2 Replies
View Related
Nov 28, 2013
How to send an email using access but how to get the emails address that are in the active directory...
View 14 Replies
View Related
May 8, 2014
I want to link into the active directory to get a list of staff usernames, so it will update the user table as new members of staff are created etc. We currently have around 130 staff, so rather than manually updating the user table i want it to pick up the usernames from AD?
View 3 Replies
View Related
Dec 26, 2014
I use the following code to achieve following
a) Open a word document from MS access / VBA,
b) Connect to data from a query
c) mailmerge it
d) Save it as a new document containing mailemerged letters.
The code does open the required document as I can see it open.
I put a message box to recheck that filename/path is what I mean, and to to know till which line the code runs. Code runs till that point and that word doc is seen open. I get the error message before
Then I get error message.
I was fooling around and was getting message " This command is not available because no document is open" I tried to remove few lines thinking redundancy. Before getting the message, I was also getting the error trapping message "No documents opened."
Now I am getting different message.
I am getting message " The remote Server Machine does not Exist or is unavailable"
Following is the code I have written.
Dim xlApp As Object
Set xlApp = CreateObject("word.Application")
xlApp.Visible = True
fn = FormPathName("941 2014 AutoOpen.doc")
[Code] .....
View 5 Replies
View Related
Jul 20, 2015
I have a database that, I would like to add a button that performs a active directory lookup. I would like it to check a username with Active Directory, and auto populate a few fields.
First Name
Last Name
Manager
Department
This is my first database and I have very little exp using VBA.
View 7 Replies
View Related
Oct 10, 2013
I would like to get a list of all the users in the active directory and put them in a combo box. How to do this? I would like it to show there CN name
View 9 Replies
View Related
Mar 20, 2014
I want to pass a string aPath contains path of the active workbook to access vba module or sub. Below is my excel vba code that will open access db form. How do i pass the string value to access vba.
Code:
Dim aPath, aDbase, aDSource, aTable, exePath As String
Dim fileParam As String
aPath = ActiveWorkbook.Path
aDbase = "near_14.accdb"
aDSource = aPath & "" & aDbase
[Code]...
View 4 Replies
View Related
Jan 29, 2015
I am writing the following code to check if 'Active' field in table TypeTable2 is ticked or not for records. If I write the following statement to select the records from Access table where Active is not ticked then it gives "data Type mismatch in criteria expression".
Code:
strsql = "SELECT distinct EnvelopeType FROM TypeTable2 where Active='Yes'
View 3 Replies
View Related
May 4, 2015
I have a main form that controls 2 subforms. sbfActiveProjects displays a list of records that have not been flagged as complete. Upon clicking on a record in sbfActiveProjects, the details of that record show up in sbfProject. This functionality works great, except when I try to create a new record. The code works fine for getting a new record, however once I run the command I lose my ability to navigate to other active records.
Code:
Private Sub cmdNewProject_Click()
'set focus to sbfProject
sbfProject.SetFocus
'navigate to new record
DoCmd.GoToRecord , "", acNewRec
End Sub
View 2 Replies
View Related
Jan 28, 2014
Essentially I have a form_A with several tab's and then one list control box in each of those tabs. At present if you double click on any item within the control boxes your taken to another form_B with info about that item and when you close that from down again if refreshes form_A.
Is it possible to only refresh the specific list control box that is active instead of refreshing the whole form ?
View 4 Replies
View Related
Jul 31, 2013
I'm trying to tie a from into the results from and AD Query. I'm not that experienced with doing this kind of thing so I may be going about this the wrong way. Anyway here's what I've got so far:
Code:
Private Sub Form_Open(Cancel As Integer)
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
With cn
.ConnectionString = "Provider=ADSDSOObject;Trusted_Connection=yes;"
[Code] .....
When stepping through the code, it all goes well until it hits the line that actually connects it to the form "Set Me.Recordset = rs".
When this line is executed, Access crashes and attempts to restart.
PS: Access 2010, Win7 64bit
View 5 Replies
View Related
Jun 14, 2013
I would like to update a txtbox with a simple int count of the number of times a mouse is left-clicked while on an active form. How do I do this?
View 5 Replies
View Related
Nov 11, 2014
I am using the following code to open a cmd window and wait while it executes, but I would like to run the cmd window minimized but cannot work out how to do that
Code:
Option Compare Database
Option Explicit
Private Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
[code]....
how to change the cmd window style.
View 2 Replies
View Related
Nov 14, 2014
Why does the DoCmd.TransferDatabase work in the Immediate window, but not in the Sub, which has always worked in the past?
Code:
Public tblname As String
Public tblNewname As Variant
Public pstrDatabasePath As String
Public Const dbType As String = "Microsoft Access"
[code]....
ERROR MESSAGE: 3125 '' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
View 4 Replies
View Related
Feb 15, 2005
Hi,
I have a parent window which upon clicking on a button will pop-up a child window containing a listbox. The listbox recordsource is a subset of the parent window. I want the user to select a record from the listbox which will load the selected record onto the parent window.
How does one pass argument back from child window to parent window?
From parent window to child window, I used
docmd.openform ,,,,,,[argument] and me.openargs in the child window
thanks in advance.
View 4 Replies
View Related
Aug 21, 2013
Is there a command that I can use to export a spreadsheet to Excel...
I could use docmd.transferspreadsheet
however that would also mean i would need an input window where users would need to manually put in the location they wish to save to...
Instead, could i not get a "SaveAs" command window or a file browser at least for them to search that way?
Alternatively, If it was possible to use VBA to pop up the "Export - Excel Spreadsheet" window, that would be just as good.
View 2 Replies
View Related
Jun 7, 2013
I am new to VBA for access. I am working on a form as a user interface. I have added an picture to the form and it will change, according to the selection in the combobox. It looks small, and not clear because of the size, and each image has different size. I would like to know if there is a VBA code that will allow me to click on it, and then it will open in another window so it is bigger with the right sizes.
View 6 Replies
View Related
Nov 16, 2014
Who can tell me how to minimize Access window while it's form is on top of other open windows (e.g. other applications which are maximized like Excel). By using acCmdAppMinimize command, only the Access window is minimized and if other applications are maxmized, they will be on top. So is there any vba solution to do what I explained?
View 4 Replies
View Related
Dec 4, 2013
How I configure my Form Window to pop up as soon as I open my Access Database?
View 3 Replies
View Related
May 2, 2014
I've tried to add some basic login (not really security) to my database so that when a different name is entered into the login box a different form is opened.
I got this working but the login form stays in foreground and I can't click anything behind it and can't get to the design view to change any properties of anything.
I've also changed this login form to the startup item so it always loads when i start the database.
Is there way to get back to the design view or do i have to start again from my backup?
View 2 Replies
View Related
Jun 18, 2015
I want to find a way to grab the text from the window that shows the location of the file using vba in Access.
View 3 Replies
View Related
Oct 21, 2013
My application is developed in Access 2003 version. Recently we moved from Access 2003 to Access 2010. Now users are facing usability issues like - in Access 2003 all the forms are opening in different windows and they can move to forms easily. But in Access 2010 all the Forms are opening in same window, if they want to move to different forms then they need to close the current window or press ctrl+F6. How can I enable/open forms multiple window in Access 2010.
View 3 Replies
View Related
Apr 6, 2006
Is there any way to add a dropdown box or something that determines that a subrecord is active/completed, and then have a way to jump straight to the one that is active by clicking a button on the record? In the example I attached, I want to be able to click on the button above the tab and have it switch to that tab and open the first record it finds that has "Active" selected.
View 1 Replies
View Related
Mar 9, 2008
Hi Again guys,
I have a database application, front end on the local machines, back end on a server (it happens to be a mac server, but still works). Recently we upgraded to Access2007 on all systems, but left the backend in 2000 format. Ever since then we have been having issues with our users getting told "Too Many Active Users" when they try and access the backend. If all users disconnect and the reconnect it seems to be fine for a while, then after sometime it does it again. I assume it has something to do with the ldb file on the backend. It worked fine in 2003, now I am stumped. It possibly has something to do with permissions but I have no idea what.
Thanks for any help.
View 10 Replies
View Related
May 3, 2005
I have application made in MS Access 2000
I got crazy with one Active X Control on one PC. On every other PC works fine but on this one I have error "Object is missing or does not exist".
I tried delete - copy - paste couple times, unregister and register control couple time, but error is still there.
Reference looks fine, I put control on the form and everything looks great.
I tried delete control from the form and put again.
When I try to assign some data to the control I have error "Object is missing or does not exists".
It's look like my Access programm see just as read only or something like that.
Does anybody have idea why my Active X Control does not work on this PC?
View 2 Replies
View Related