A layout provides a grouping method for controls on a form or report. The two default layout types are Tabular (labels in form header, controls in detail), and Stacked (labels to the left, controls to the right, all in detail). Regardless of which layout you choose, you can edit it afterward to work any way you please.
You apply a layout under the Arrange tab, in the Table group. Layouts in Access are an emulation of HTML tables, which...
User Profile
Collapse
-
I realized that the method I gave you (not giving the path) is actually a solution for when you call BrowseTo from inside the subform. However, I think I see now what the real issue is. When you specify the path to the subform, the BrowseTo statement expects a change in the SourceObject. However, since you're calling out the same form that is already loaded, it's not re-opening the subform in the new DataMode. The only way I can think of to change... -
Since it's the second issue, try just usingCode:DoCmd.BrowseTo acBrowseToForm, "frmEmployee", , , , acFormAdd
Leave a comment:
-
Got it. WantedName is a string, correct? Use instead
Code:StPassenger = Nz(DLookup("WantedName", "WantedList", "WantedName = '" & Nz(Me.PassengerName.Value) & "'"))
Code:WantedName = Billy The Kid
Leave a comment:
-
Since a splitform does, in effect, create two instances of a form, it's probable that an object module-level variable would never work. If you don't want to explicitly use a global variable, perhaps a TempVar which is created when you need it and removed as soon as you don't would strike your fancy. With that, you could bypass OpenArgs altogether.Leave a comment:
-
What is the context in which you're using this command? FWIW, I only know of two "issues" with BrowseTo. First and foremost, the form needs to be open in order for it to work (it isn't an implicit OpenForm). Second, if you are running data from a form and just trying to change the data mode of a subform on that form, entering the Path statement can cause it to fail. I think it's more likely that the second one is your issue, but without...Leave a comment:
-
The best way to do this is to have your form fill in a table with a unique record ID, then when the user clicks the button, save the record and pass the record's ID number from the form as filter criteria to the report, which is also pulling its data from the same table the user just entered the data into. Forms and reports don't actually "hold" the data, the data should always be held in one or more tables. If you don't want the data saved,...Leave a comment:
-
Your function usage is still flawed. DLookup returns a matching string.
Your code should read:
Code:Private Sub PassengerName_Exit(Cancel As Integer) Dim StPassenger As String StPassenger = Nz(DLookup("wantedName", "WantedList", "WantedName = " & Nz(Me.PassengerName.Value))) 'Nz will turn null results into blanks, a good practice to use If Not StPassenger = "" Then
Leave a comment:
-
It's been a few years, but for anyone stumbling upon this post: Don't forget to setCode:Screen.MousePointer = 0 'Access default
Also, relating to bluray's comment, if buttons in the 2007+ versions of Access...Leave a comment:
-
topher23 replied to Application-defined error when populating cells in late-bound Excel automation objectin AccessHmmm, looks like I may have been wrong about modules. I remembered reading in the past that you could use Sheets([modulename]) just like Modules([modulename]) in Access, but I just tried it and it didn't work. Further reading leads me to the belief that my memory on that may have been faulty. The Sheets collection only consists of the objects that show up as tabs in the GUI, which can also be referenced through the collections relating to their specific...Leave a comment:
-
topher23 replied to Application-defined error when populating cells in late-bound Excel automation objectin Access1. Late binding because there are several different versions of Excel in use at our company, so this eliminates broken references.
2. I used to use Worksheets more often, but the Sheets collection allows direct reference to worksheets, chart "sheets", and modules (instead of just standard worksheets), so I tend to use that instead when coding.
3. I've had Activesheet give me unpredictable results with automation in the past,...Leave a comment:
-
topher23 replied to Application-defined error when populating cells in late-bound Excel automation objectin AccessGrrr! I just tacked aCode:DoEvents
Leave a comment:
-
topher23 started a topic Application-defined error when populating cells in late-bound Excel automation objectin AccessApplication-defined error when populating cells in late-bound Excel automation object
I have an Access subroutine that needs to generate an Excel spreadsheet for accounting. I've used late-bound Excel automation before, but for some reason I keep running into a strange issue when I run this one.
This is the relevant portion of the procedure:
Code:Private Sub GenerateExplodedBOM() 'On Error GoTo Err_Handler Dim appXL As Object Dim wbBOM As Object Dim rs As New adodb.Recordset
-
How to Export a Form or Report as a "Package"
It happens often in Access development environments: you're working in one database, and you realize that you want to use a form or report in another database that you or your company are also developing. But when you import/export the object, you discover that a lot of the objects that it depends on (tables, queries, subforms/subreports) aren't in the other database and also need import/export. Eventually, you get everything transferred, but wonder... -
I tried out those Vista instructions - Win 7 and 8 actually don't have the same option, but they do have a combo box that has similar wording in it. Just to be certain, I downloaded 7+ Taskbar Tweaker and looked at the settings there, which shows "Group on Application ID" selected. I'm guessing that when I change the Current Database Name in Options, Access no longer claims it so the OS gives it its own Application ID. So... it looks like...Leave a comment:
-
Is it possible to name a database and still treat it as a document?
I'm developing a modular system in which each major function set is held in a different Access front end. I'd like to have all of the open front ends stack under one Windows start bar icon in order to maintain that relationship visibly and keep the start bar clean. Is it possible to name the databases in such a way that they have different names, but still stack under one icon? I've tried the most obvious solution (just insert dashes) but that doesn't... -
If you're going to use Outlook Automation like this, don't forget to add "Microsoft Outlook ##.# Object Library" as a Reference or use late binding, as discussed in this insight from Adezii: Early vs. Late BindingLeave a comment:
-
FYI, serial number implies series, as in "each instance comes after the last." An autonumber is a true serial number generator; it provides unique identifiers in series. If what you are doing is try to provide an identifier for something like a unique sort, this makes better sense.
As to why this doesn't work, I'm concerned about bookno. In your commented sql string, you call it out as [book_no], but in the SQL that is executing...Leave a comment:
-
Make sure that your procedure is also set up to handle HTML. At least in the past, with Outlook automation, you could specify a body string as eitherCode:olMailItem.Body
Code:olMailItem.HTMLbody
Leave a comment:
-
According to Microsoft's website: Access 2010 supports a maximum of 64 connections per process with a limit of 256 concurrent open read/write connections per database.
But your best practice will still be to split into FE/BE to reduce the chances of data corruption. A shared front-end with no data will be at risk of code/object corruption, but that can be handled with a good backup procedure. The back-end would then be safer from data...Leave a comment:
No activity results to display
Show More
Leave a comment: