I'm wondering how other members here make decisions whether they want to place codes behind form or use a standard module instead.
I understand there is a performance penalty when you add another module (and use it), but am not sure whether one big fat module would be faster than several smaller modules with identical coding.
Furthermore, I know that some members use a hidden form to deal with startup and shutdown processing. Sometimes the processing has nothing to do with forms and would make more sense in a standard module, but since the form is already loaded, does it makes more sense to use the module behind the form than calling a function in a separate standard module to execute the needed code?
I've been playing around with creating a switchboard. At first, I saw a form appear in the forms area called switchboard. but now it's gone. I have a switchboard marked as Default under Switchboard Manager, I can see that a table has been created called Switchboard Items, but it won't open on startup. (obviously, because there isn't a form which I can point to in the startup box)
Any idea why the switchboard form is not being created?
I have imported the contents of my database into a new database, as all the testing is completed and want a clean start without any dummy data in it or anything. My main form which is where most of the interaction with the database goes on appears blank with no controls on it on form view. In design view, I can see everything (buttons, search fields, subforms etc) but turn into form view, it's blank (except the header). Does anyone know why this happened?
I am around 2 months working with access. I created an application/dataentry form and it was working very well. suddenly today, I got an error which says. Run-time Error 5 "Invalid Procedure Call or Argument. together with that or may be independent, a pop up search form just disappeared. I put a msgbox in form load of pop up form and the msgbox appears but the pop up form just disappeared.
I was about to give the application to use and thats when all these happened ...
I am creating an form in a database and whenever one of my procedure's run it creates this error message:
The expression ON Load you entered as the event property setting produced the following error: Member already exists in an object module from which this object module derives.
*The expression may not result in the name of a macro, the name of a user-defined function, or [event Procedure]. *There may have been an error evaluating the function, event, or macro.
I am in Acess2000 and trying to go to put vb in. When I hit the code icon, I get the message: "name of db" failed to create the VB module '|'.
Is anyone familiar with this message and what do I need to do. I just added this form, and in the other forms that have vb code already, I can get to them okay.
I have a button on a form which calls a module to show a calendar form. The user picks date and time, and saves it. The calendar form closes and adds the date and time to a text box on the initial form.I want to save the record so that the underlying table/query is updated, but it's not working. The record is not saved until the initial form is closed.Here's the form vba...
Code:
Option Compare Database Option Explicit Private blnFlag As Boolean, blnSaveIt As Boolean Private Sub btnDelete_Click() On Error GoTo Err_btnDelete_Click
I'm working on the Navigation Form template in Access 2010, which is new to me. It appears that one needs to use the BrowseTo command to open up a form in the built-in subform module. I'm trying to create a couple of buttons where each button opens a form in a different data mode; one in read-only and one in add mode. Here is the syntax I used for read-only:
frmSales is the Sales form I want both of the buttons to open and frmNavigation is the Navigation form. It seems to be ignoring the data mode part at the end however. It only will open in Edit mode. Is there something I'm doing wrong with this command?
Is the calling Form name or the event handler's sub name available in called module? I need it in order to determine the form's name as in [Forms]!someformname!some control.
You know, when I create a new form and add a button to it. Then I add a new module and entered a public Sub in it. Once I switch back to the new form, I typed this below..
Code:Dim sTest as basTest
I noticed there is no "basTest" in the intellisense. Why? I kept getting a compiler error saying "A module is not a valid type". What do I need to do to fix that? I'm at loss on what's the problem is.
I have three forms - Form1,Form2 and Form3 linked to a navigation form with Navigation buttons. I have separate VBA codes under each Before update event of these forms, Form1,Form2 and Form3 to call a VBA module to track the changes performed by the users(Like an Audit Trail) in specified fields of the forms which will track them to a table.there are control tags in the form properties --> others --> Tag to track the changes in the fields which are defined in the VBA Module.this is the code to call the VBA Module:
Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.NewRecord Then Call AuditChanges("UniqueID", "Part No", "NEW") Else Call AuditChanges("UniqueID", "Part No", "EDIT") End If End Sub
[code]....
The code is working perfect when the forms are run separately.but when they are run from the navigation form by clicking the navigation buttons, the code is not working !!
I have this code below that is working however the calculation are updating on my form late.
Basically, I have some calculation that are performed on a "After Update" event on some controls on my form. I wanted it to do the calculation after I update the control on the form.
The code is in a module and I just call the function after update on the control But the form is not updating when I change the value in a field. I have to change the field again for it to update.
Control
Code: Call GeraAuditCalc DoCmd.RefreshRecord
Function
Code: Function GeraAuditCalc() Dim fHrs As Double Dim Ttl As Double Dim Ttl1 As Double Dim Ttl2 As Double
Is there a limit to the number of fucntions/suroutines in a Form's module. I got an overflowerror when compiling and I moved a fucntion from the Forms mdoule to another module and the error did not re-appear.
I am trying to create a customizable report that would allow the users to choose fields. I have a pretty common code that I found online and adapted it, but it fails on the first SetReportControl function.
The error reads: Run-time error 2465: Application-defined or object-defined error
Could it be something as simple as an incorrect reference? I have checked multiple times, but I am stumped.
Code: Option Compare Database Option Explicit Sub MakeReport()
[Code].....
This is a trial run, in the end I need to be able to open a report, then adjust the Report controls within 1 or more subreports inside the main report. That is a battle for another day.
Up until recently, when I selected multiple objects in design view (on a form) and right-clicked the mouse, I had several options in the 'Size' sub-menu (including 'Size to Widest / Tallest / Narrowest / Shortest').
Then I tried to be clever(!) and create a new custom toolbar which had just these options on it, as I use them frequently. This was all very well until now, when I can't find the custom toolbar I created, and the options have disappeared from the Size submenu aswell!
Has anyone got any ideas on how I can get them back??
(I have tried going into Customize to drag them back, but they're not there either! :( )
I'm currently facing a strange problem! When I want to insert a command-button, a drop-down menu etc. no userguides appear anymore. I like to do the most basic work in design-mode, so I kind of miss then a lot...
I'm currently facing a strange problem! When I want to insert a command-button, a drop-down menu etc. no userguides appear anymore. I like to do the most basic work in design-mode, so I kind of miss then a lot...
The Database Window within Access on my computer seems to have kinda half disappeared under all the toobars at the top of the screen. Each time i open it it seems to have moved further up. The problem is, that because it is underneath the toolbars, I can't click on the window of it to drag it back down! Now, its got so far up that i can't even select any of my tables, forms, queries or reports because i can't see them!
Its SOOO annoying! and i have no idea what to do about it!
I have a orders sub form that was working great .Then all of asudden when i when to input information into the fields i realised the grid under variuos field names has disappered (Icant enter any info),surly this must be something i have accidentally done without realizing.
i am using MS Access 2010, i am on initial stage and i have to made main log in form or switch board, but as soon i create a blank form and click on button in design but only command button appeared but not along with command buttong wizards so i will select button to close application or to open a farm and so