Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba

Geek News

Threads Replies Last Post
359 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  >>  
Copying Form from one Access db to another.
Hello, I'm new to VBA Access. I have 2 databases that have the same information. One db is a staging db and the other db is production. I created a form in the staging db and it successfully executes everything I want it to do. However, when I copy the form to production, I get a compile error, "User-defined type not defined". When I try to execute the form in production, the fir...
5 12/3/2008 8:05:53 PM
Multi Select List Box
I am using a multi-select list box to populate a table. I have items that undergo several different tests and I add a separate line for each test in tblTestDetail. I have successfully written the code to add these records. My problem is I would like to edit these records. Ideally I would find the item and all the tests that have been performed would be highlighted in my multi-select list...
1 12/3/2008 7:06:52 PM
Calendar Help
I am designing a form the will allow the user to enter in time worked for variouse different items. Each row will contain the item and hours. I also need to use the calendar to allow them to select the friday of that week and have the form then show the dates for that week as heading on the column and to be stored in the database. I guess my question is how do I get the dates for ...
1 12/3/2008 6:52:05 PM
Use a string as a field name
I am looking through a recordset at individual records, when i call rs1![Field 1] its fine however, i want to be able to use a variable name instead, which contains the name of the field as a string e.g. rs1!Variable1 Note: The String may contain spaces. How do i get this to work? Thanks Tom ...
7 12/3/2008 6:10:45 PM
Determine current directory
When I use the CurDir function the value returned is only 2 levels. The application is infact on the fourth level. Is it possible to determine 4 or more levels deep? -- Tony...
3 12/3/2008 4:41:01 PM
Tab Control select issue
I have a tab control with the following proceudre for on the On Change Event: Private Sub TabCtl0_Change() DoCmd.Requery End Sub Everything work perfectly until someone clicks a SECOND time on the tab/page that is ALREADY selected. The tab gets a light dashed line around it and many of the menu items are greyed out. (sort, cut, paste and filter by selection are examp...
6 12/3/2008 4:05:02 PM
Required Field Problem
I have a form with several required fileds (set with the property in the underlying table). One filed is a drop down list. If the user does not find it in the list, he/she will have to add the value to a lookup table so it is available for them to use when creating a new record. So a user begins to type in a new value, and the autocomplete does not grab any existing values. Fine. Or ...
4 12/3/2008 3:21:38 PM
eval function and command function in access 2007
In previous Access versions i used : strResult=eval(strTest) with strTest containing : instr(command(),"TSE") since access2007 this doesn't work ! I get error 2425 "Unknown function name" with tests in debug window i found the issue is in eval("command()") The command() function outside eval works but not in an eval string....
5 12/3/2008 8:12:02 AM
Passing Variable Value
I have very little experience passing variables between forms, modules, etc. I haev experimented with creating public variables in a forms declaration, but have not had any luck. I would simply like to populate a field on an open form with a value after a record in another form is created, but I only want this to happen in specific scenarios. So I want to pass a boolean variable from ...
2 12/3/2008 4:51:55 AM
String to Date
I have a piece of code that runs an append parameter query. When I run it as: Set db = CurrentDb Set qdf = db.QueryDefs("Pre-2008 Step4 app_Transactions") qdf.Parameters(0) = #12/31/95# qdf.Execute dbFailOnError it works. But if I try to make the date a string variable that I concatenate it doesn't work. For example: Set db = CurrentDb Set qdf = db.QueryDefs("Pr...
8 12/3/2008 1:20:01 AM
Return results of INSERT
I have a process that needs to first insert a header record in one table, then detail records in another table where the newly-created PK in the header table is the FK for the detail records. My concern is capturing the auto-numbered PK of the just-inserted record so that I can include it as the FK when I insert the detail records. As of now, I insert the header record and immediately c...
6 12/2/2008 11:42:06 PM
Random number initializing
How do I initialize the random number function to return different random numbers for each Access session? Thank you Dave ...
4 12/2/2008 11:21:23 PM
Validate Data and Display MsgBox
Need help to figure out how I can get this to work. I know it's probably very simple and I've come close several times but it's just not good enough. I have 2 Tables. One is Members and the other is Enrollments. Both have the common field of MemberID. I have a form based off the Enrollments table and need the MemberID to check if the data typed in is not part of the Members table. If i...
4 12/2/2008 11:14:21 PM
Trying to Send Email, Via Outlook, Using VBA
I followed the example at this site: http://support.microsoft.com/kb/318881 It didn't work after I modified the code slightly; trying to use this code: Sub SendMessages(Optional AttachmentPath) Dim MyDB As Database Dim MyRS As Recordset Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim objOutlookAttach ...
12 12/2/2008 9:26:00 PM
VBA code problem
If [FunctionHours] = Null Then [DateCompleted].SetFocus If [DateCompleted].Value > 0 Then Response = MsgBox("When a completed project date is entered, Total Function Hours must be entered. 0 is allowed. ", vbOKOnly, "Completed Project Warning") DoCmd.GoToControl "FunctionHours" Else End If ...
3 12/2/2008 9:03:01 PM
Determine office version that is running on users machine
I'm in a situation where I have multiple users of a database application that are using different versions (2003, 2007) of the same application. I've got a "front end updater" that I'm trying to give the additional functionality of downloading the correct version of the database. This is easy if they already have a copy of the database on their computer (I just look at the file exten...
7 12/2/2008 6:36:09 PM
How to identify the type of query?
Hi folk, Is is possible to identify the type of query via vba? For example: select query, delete query, update query? Thanks in advance. Tim. ...
5 12/2/2008 4:24:00 PM
Callback function
Hello I've a form that has a button. When I click that button I want to open another form in dialog mode to some user data input. After that the user clicks close on that dialog form and i need to refresh the main form. Is there any callback funcionality in access that i can use to overcome this? What do you sugest?! best regards Jorge...
4 12/2/2008 3:52:24 PM
Compare Records & Move to new table in VBA
I want to make a loop whereby i can compare the first record with every other record until i find a 'True' comparison, if i find this, move the records into a new table, otherwise, move onto the second record and repeat. I figured i would do this with a for next loop, i have done them in excel, but im not certain of how to compare cells in access. Thanks Tom...
8 12/2/2008 2:23:19 PM
Add Built in functions in Expression Builder
When I create a query in my works database using the expression builder, under Functions, Built-In Functions, General.... I can see a list of functions (Command$, Environ$ and many more). This is an Access 2003 database. I use Access 2007 at home and have my own database in which I want to use the Environ$ function, but it is not in the list of general functions in the expression bui...
1 12/2/2008 11:33:00 AM
Error Handler (Global?)
Hello All I have been using local error handlers for some time now and for the first time I have something that I feel I need to add as a global error i.e. a way to handle database connectivity failure. I thought about global error handlers and have read a few things on them. All articles seem to be devoted to EITHER local OR global. Is there anything wrong, programatically, with usin...
4 12/2/2008 1:33:26 AM
Loop Help
My code works but I cannot figure out how to reset the payment amount when I get to the next account number. I have the following query that I want to allocate a balance to. For example, the payment is $300, and I need to allocate to the largest amount first and then finish it off. For example, my qry is as such. AccNumber Symbol Balance Payment 1212 ...
5 12/1/2008 11:04:51 PM
shortcut menu reuse issues
I've got a shortcut (popup) menu that I want to use with several forms. It is a simple menu and function call, but I would like to avoid multiple similar copies of the shortcut menu or function that the menu implements to just handle the name of a table. Basically, the popup calls a function (fnSelect) and passes it a value (-1, 0, or 1) which will determine whether a field (IsSelected...
3 12/1/2008 10:33:25 PM
Code not assigned to form
I want to run a delete query if someone clicks the x in the upper right-hand corner of the Access application instead of clicking the quit button on my form. I'm sure this is very simple, but I'm not sure how to do it. Can someone show me the proper syntax? Also, what module should this code be written to? -- Don Rountree...
5 12/3/2008 5:25:01 PM
Linked table problem
We have two different Access databases, the SAR database and the Use Case database. The SAR database has code to "kick out" users which needs to be done daily in order to make code changes and/or compact & repair the db. The Use Case db wants to link to a table in the SAR db to provide information for a report. The problem is that when the Use Case db has the SAR db linked table open,...
2 12/4/2008 12:29:01 AM
359 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  >>  

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net