Startup Module For Common Code

Oct 22, 2007

Is there a way, similar to Excel's "personal.xls", to put all my reuseable Access code into one central module?
Thanks in advance.

View Replies


ADVERTISEMENT

Whether To Code In A Form Module Or A Standard Module?

Dec 14, 2007

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?

So, what do you tend to do in such situation?

View 14 Replies View Related

Module Code Stops Working

Nov 17, 2006

just wondering why randomly certain modules in the form code stop working..

when you accidentally press return.. or do something in the wrong order.. or apply one rule to one control.. and then another control rule stops working..

so you have to delete the code.. right click on the control's event.. and re-insert the code into the event section.. and then it works..

why?

View 4 Replies View Related

VBA Code To Set The MS Access Startup

May 30, 2005

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?

Thanks for your help...

View 1 Replies View Related

General :: Break Points In Code Module Fail To Work

Oct 16, 2013

Does your Tools Reference have an MS Office 15.0 Object Library?

Just had to share this strange occurrence in the VB Code Module:

I use breakpoints all the time, was just using them yesterday.

Noticed that some events seemed to act differently this morning. The front-end was approaching 88 MB (after compress) so it is time for a change anyway.

Created a new blank Access dB (Access 2010) and imported all objects from my last backup revision. Reset the home page and tools References. Matched the settings side by side. As usual, the database shrank from 88 MB to 60 MB. The import all objects will usually compress things about this much.

From the screen shot, put breakpoints in previous code, added a new Lost-focus event and added a message box. None of the breakpoints work. The message box fires on the lost_focus and all of the code in the Click event works fine. But, not a single break point would work.

Totally powered down and restarted the Windows 7 32 bit Enterprise workstation. Still no change.

Took the screen shot of Tool-References from the code module of a two week old archive version. Used it to evaluate my new imported object database.To my surprise, the Microsoft Office 14.0 Object library is now Microsoft Office 15.0 Object Library.Also put all the objects back in the same order. Saved and closed the new imported object database.Now, the breakpoints work just fine.

I had failed to reference the Office 15 Object Library and the VBA Extensibility 5.Office 14 Object Library is nowhere to be found except on my 2 week old backup archive.

Is this a Microsoft auto update? Is this what drives the breakpoint in the code module?

View 3 Replies View Related

Error: Member Already Exists In An Object Module From Which This Object Module Derive

Oct 1, 2004

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.

An ideas?

View 7 Replies View Related

Common Data

Sep 5, 2005

I have 2 tables called Table1 ( has field called Mydata) and table2 (has Field called YourData).

Mydata has followind data 1, 2, 3 and yourData has 2,3,4

2 and 3 are comman data. how can I write query or type of function I can use to bring comman data.

I have used Union table that brings all record.

View 2 Replies View Related

Cannot Invoke Common Dialog

Nov 27, 2005

I am trying to add a common dialog to my form from the toolbox and get the following error 'you dont have the license required to use this ActiveX control. Is there any way I can sort this out? I am using Access 2002. I am getting desperate and any help would be much appreciated

View 3 Replies View Related

Common Access Errors

Sep 27, 2006

Hi,

I did a search on common access errors and other errors that you would want to trap and got the following results:


Cannot update. Database or object is read-only
Operation must use an updateable query
General error Unable to open registry key
Could not find file
Could not use '(unknown)'; file already in use
Table 'tblTable' is exclusively locked by user 'Admin' on machine 'MyMachine'
Too few parameters. Expected 1
Either BOF or EOF is True, or the current record has been deleted
Item cannot be found in the collection corresponding to the requested name or ordinal
The search key was not found in any record


If you know any extra errors, can you please add them to this list?

Regards,
B

View 6 Replies View Related

How Do You Find The Most Common Value In A Field

Mar 27, 2008

I am OK with a number field as I can put it in Excel and use =Mode().

But that wont do text such as lastname, suburb etc. I can do suburb by doing postcode but no such equivalent from some others I want to do

View 4 Replies View Related

Common Reg. Exp. For Validation Rules

Oct 12, 2004

Hey there,

Is there a listing anywhere online for common regular expressions for validations rules? In other words, is there something that shows how to construct validation rules for things like phone numbers, addresses, postal/zip codes, serial numbers, math equations, etc. Two in particular that I'm looking for are phone numbers and postal/zip codes. Every time I try to wrap my head around the formula for a phone number (with area codes, an optional 1 in the begining, making sure no leading zeroes, making brackets around area codes optional, etc.) I only get a headache :mad: . I'll get it eventually, but a quick reference in the mean time and for future use would be very helpful.


Thanks so much,

Gibby :)

View 2 Replies View Related

Would You Make Common Variables Public?

Oct 9, 2007

It just occurred to me that I use certain variables in several of my routines. Maybe you've done the same... something like:

Dim db as DAO.Database
Dim rst as DAO.recordset
Dim qdf as DAO.QueryDef

Now, if it's re-used in many routines, wouldn't it make more sense to make it a public variable, and set them to whatever you need it for a certain routine? Would it be more efficient than having to re-initializing and discarding it for every routine that used it? What problem would one expect from making them public?

Also, since it's very common to set db = CurrentDb, would it also make sense to set it publicly, and for cases where you aren't using CurrentDb, use a private variable just for that one?

View 7 Replies View Related

Two Tables With No Primary Key But A Common Field

Jun 15, 2006

Hi guys,

I am having problem with a query.

I have to tables. One named wire and the other named Input.
As my title says there is not unique ID for the tables to relate.. the only thing to relate is one ID where is not unique for all the rows

In the Wire Table I have 3 rows using the same ID, lets say 123.
In the Input Table I have 1 row using the same ID as above, i.e. 123

I need to select a couple of fields from Wire Table and 1 field from Input Table
The only relationship I have is the ID 123.... since the ID in Wire Table is repeated in 3 rows.... I would like to use the same value from the Input Table to be the same for the 3 rows in the other table.. Below is an example:

Wire Table:

ID Group
123 A
123 B
123 C

Input Table
ID Description
123 Analog


My wanted result would be

Group Description
A Analog
B Analog
C Analog


I tried using the Left join or Join function, but somehow the resulting table has many duplicates of the rows...such as:

Group Description
A Analog
A Analog
A Analog
A Analog
A Analog
B Analog
B Analog
B Analog
B Analog
...

Any Idea on whats going on and how can i solve this problem????

Thanks in advance. Your Help is much appreciated

View 1 Replies View Related

Trying To Use A Common File DIalog To Update OLE

Dec 1, 2006

I have my form where each records image displays as you scroll through the records. I want to add a control similar to the file dialog control, where users can browse to an image file on their machine, and then preview it and Update it.

Can anyone walk me thru how to do this?

View 1 Replies View Related

Common Dialog Box In MS Access Form

Jul 15, 2005

Is there anyway to put common dialog box in MS Access Form. There is an option from ActiveX controls icon, but gives an error message, saying I do not have licence to use it ?

View 8 Replies View Related

Can Open Several Forms With One Common Button??

Jan 23, 2008

Hi all,
I am new to microsoft access. I've got one question that can't solve.
I am making database with several items. Under each item, there got different field lists to fill in. So I made several forms for each of them.
In main form, I put one combo box to choose the item and one common button. So how can I write the code to open the several different forms,one at a time, by clicking one button according to the value that is chosen from combo box??
thank in advance.

View 7 Replies View Related

Modules & VBA :: Greatest Common Divisor

Sep 16, 2014

How to find Greatest common divisor in MS Access?Have a 2 columns in my form: 1) amount; 2) GCD

E.G

amount | GCD
1200
500
400
100

Should be after runing code

amount | GCD
1200 | 12
500 | 5
400 | 4
100 | 1

I was looking form some function but I found only for Ms Excel :/

View 11 Replies View Related

Matching (find All In Common) Two Tables Of Titles

Aug 12, 2005

Hi,

I have two tables of titles (DVDs and CDs). Each table has a price associated with each title in an adjacent column. I would like to match the titles between them and compare prices. Any help would be greatly appreciated. Thanks. EDS

View 2 Replies View Related

Common Data In Two Tables Of Different Size, How Do I Append From One To The Other..?

Jul 23, 2006

Hello,

Firstly I would like to state that i have very little knowledge of Access databases (my job is not computer related) but I am trying my best to get a few issues sorted...
So here it goes: I have 2 tables, one large table with about 3-4000 rows(horizontal lines), and a smaller table with only about 1000 rows.

The rows in the big table contain Products (name, dates, adresses, phone numbers etc) and every product has a 'Codename' in a column-line (vertical)
of the big table. (there are about 3000-4000 products)
In the small table there exists a similar column-line (vertical) that contains 'Codenames' of the Products listed in the big table, but there are only ~ 1000 'Codenames' not the full 4000 ! The reason for this is that in the small table there exists another column-line(vertical) that for every code listed (in the small table) contains a certain specific "description".

My task is to get all the 1000 "descriptions" from the small table inserted into the Big table accordingly to their proper 'Codename'. This means createing a new column in the big table and: if the codename exists in small-table insert the description in the new column-cell, if the codename doesnt exist in small-table leave new-cell empty...

How do i do this ? :) Im guessing some coding is envolved.. and i have no clue whatsoever....
Thank you,
George P.

View 2 Replies View Related

Creating A Database For Common Error Messages

Aug 23, 2006

Hello to all. This is my first post on this forum. I'm currently working on a database for my company and would like to get some more guidance from you all. I work at a helpdesk. I'm trying to create a database that allows me to search for common error messages. My co-workers and I would be inputting the messages. I would like to be able to set up a query to search for these messages for future troubleshooting. I’m just looking for a start on what the tables and fields should be and how we can input the messages. All help is greatly appreciated.

View 3 Replies View Related

Displaying Data From Two Databases That Have A Common Field

Mar 30, 2005

I'm a complete novice when it comes to dynamic data so forgive my ignorance.
My database contains details of projects in progress. A user can click a link in a list and
display a summary of that project (okay so far - I've done that bit) - in the database though there
are two tables the second one lists project events/comments (title, date, job number and description) - when something interesting
happens during a project we add to the 2nd database a summary of what happened (we made 2nd db because the list
of things happening could be one entry or 50 entries) - the tables are links by the job number.
On the web site I would like that when a user clicks the link to display the info about a project it all also pulls info from
the second db but for the project with the same number.

I've hard coded a similar thing before "select * from tblProducts where category like 'Off Road and Dirt Bikes'" but in
this case instead of hard typing 'Off Road and Dirt Bikes' I'd like it to automatically insert the job number of the project
being looked at from the first database.

I don't think I've explained this as well as I could've - but if anyone could help I will be really grateful.

View 1 Replies View Related

Forms :: Show Records With One Common Field Value

May 23, 2013

I'm a beginner trying to build a simple database for work. I'm trying to track the performance of bonds from month to month, in this case January-April. Each bond has a serial number called Serial_ID, but we wanted to create a record for each month we own the bond, so we created a primary key combining Serial_ID and start date called Serial_Start_Date. So if we own one bond, its January record would have a primary key of "4553123A 2013-01-01" and February would be "4553123A 2013-02-01". I created a form that allows a user to select one individual month's bond and display that month's return. However, I'm struggling to find a way to create a form that allows me to just select the Serial_ID and display the four month's records. Right now there is only one table in the database.

View 1 Replies View Related

Combine Datatable Rows Based In Common Value

Nov 27, 2012

i have been trying to combine data from 2 different sources, to make unique rows: here it is my situation Data in DGV already in dgv, Unbound:

column1 | Qty
"Sugar", 100
"Salt", 100
"Color", 200
"Malto", 150

Data in datatable:

column1 | Qty

"Sugar", 80
"Salt", 60
"Apio", 25
"Lemon", 60
"Color", 60

So i want a control that matches the column1 in datatable against DGV.Column1, and if value matches only add second column value and if not, then make a new row in DGV.
Final decided outcome:

column1 | Qty|Qty2
"Sugar"| 100 | 80
"Salt" | 100 | 60
"Color"| 200 | 60
"Malto"| 150
"Apio" | | 25

View 1 Replies View Related

Common Append Error, Online Solutions Not Working

Jul 31, 2007

Hi, when I run a simple append query, I get the following message below (See attached) I tried the solution in microsofts website that I have to set all text fields to AllowZeroLength to Yes, and i did that in both the table the data comes from, and the table the data is appended to. Still cant get it to work? Any other suggestions or is there somthign simple that im missing?

View 3 Replies View Related

Queries :: How To Query Number Of Records Not Common To Two Tables

Aug 9, 2013

I have two tables, identical in terms of structure (number & names of fields etc.) but different in terms of content (records not necessarily the same, some may be common to both, some may only be present in one or other table)

I want to set up a query to count the number of records which are present in one table (Table A) but not in the other (Table B) using a common identifier field, and put the numerical result in a text box on a form (i.e. use the query as the control source for the text box)

I've managed to come up with the following which provides the list of ID's :

Quote:

SELECT tblA.CommentId
FROM tblA LEFT JOIN tblB ON tblA.Id = tblB.Id
WHERE tblB.Id Is Null;

Which will come in useful elsewhere but how do I adjust this SQL to only return the number of records? I think I have to use COUNT(*) somehow but I'm not familiar with it and not sure of the syntax?

View 2 Replies View Related

Forms :: Generating Common Page Headers In Report?

Oct 16, 2013

I am seeking to generate a common Header for each page in a report. Is this possible?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved