I have a access database with about 17000 contacts.I email reports to customers through access which then goes through outlook.Recently this has stopped working and i am receiving the error
-2147418107 (80010005) It is illegal to call out while inside message filter.
The database is about 400MB in size so i tried using the compact and repair database option but had no luck.Sometimes i will receive this error and other times it will just hang..The error happens on other computers at the workplace as well so its not isolated to a single computer
I'm having to recode some old MS Access DBs so they will run in the following environments:
Office 2000 on WinXP Office 2003 on WinXP Office 2010 on WinXP Office 2000 on Win7 Office 2003 on Win7 Office 2010 on Win7
When I wrote my code for Office 2000 on WinXP things were simple because directory paths were the same across all computers and I could hard code pathing when using a shell command to launch other files.
My new approach is to make a function call to the Windows registry to determine the default executable and path for opening a file based upon its extension (see apicFindExecutable in basWindows API module).
I'm able to use code to create a shell call and debug print it to the immediate window. If I put my cursor in the immediate window at the end of the shell call and hit [enter] the external file will open as desired. If I try to open the external file directly through code, I get a file not found error.
To recreate the error take the following steps:
(1) browse to files that are accessible from your computer (2) click the PREPARE DATA AND OPEN MAIL MERGE DOCUMENTS command button
Shell function call is made by the fnOpenFile function located in the basOpenFile module. There has to be a trick here that I'm missing.
I have created forms for inputting into my database.
First of all a form opens with a choice of opening up another form displaying certain tables to input into.
On the startup form there is also a text box for the user to type in text and then using a command button filter the next form with what they have typed in.
Firstly when they dont enter anything into the text box but still press the command button this error box appears "Syntax Error (missing operator) in query expression '[Last Name]='." Then it just has an ok box
How do i get it come up with the message "Please enter a Last Name before clicking run" And then an OK
Secondly, once someone has entered the last name in the text box, pressed the command button, and the filtered form has opened and displayed the results, and then they close the results form and return to the original startup form. The text they entered in the text box is still there. Is there anyway of clearing it each time when they close the filtered form.
I'm having a problem with the syntax of a recordset of a Datasheet inside a subform which is also inside a Main Form.
Main Form - frm_1_0_LMS Subform - frm_1_4_0_TeamApprovals Subform(Datasheet) - frm_1_4_1_TeamApprovalsList
Here is my code:
Code:
Dim rs As DAO.Recordset Set rs = Forms!frm_1_0_LMS.frm_1_4_0_TeamApprovals.frm_1_4_1_TeamApprovalsList.Form.Recordset If Not (rs.EOF And rs.BOF) Then Forms!frm_1_4_2_ApproveDeclineUserLeave.Controls("lblFiledDateLeave").Caption = rs!Leave_Date End If
I am getting this error: Object doesn't support this property or method
I've been trying unsuccessfully, but i'd like to put a tab control on the page of another tab control. is this possible? i don't see why it wouldn't be.
i add a tab control, but i want to insert a table inside my tab how can i do that?..cant find any tables in my design tab when i work on my tab control
Record_No <--- This is an autonumber field Est_COE --Date Field Type DATE_DOCR DATE_Followup Progress
I then have used multiple querries that just count records based off of Status:
Example of one of the querry's: SELECT Count(borrower.Record_Number) AS Close_Of_Escrow FROM borrower WHERE (((borrower.Est_COE) Between Date() And (Date()+7)) AND ((borrower.Progress)="active"));
Another Example of one other querry: SELECT Count(Borrower_Journal_Notes.ID) AS Followups_Not_Done FROM Borrower_Journal_Notes WHERE (((Borrower_Journal_Notes.Follow_Up_date)>Date()) AND ((Borrower_Journal_Notes.Followed_Up_Complete) Not Like -1));
Then I put both these querry's into a another querry so i can get the data put into a single form using one record source. (The master querry)
here's my problem... i have a crosstab query where in one field (value) has a range of 1 to 19. I used the min and max for two separate row headings....
the min and max works only on values (1 to 9) or (11 to 19) example... the 2 columns have values 8 and 4 the min returns 4 and the max returns 8
however, when the values became a mix of single and double digit (e.g. 11 and 8) the min returns 11 and the max returns 8
does the min function on compares the values with only the same digits?
I've been trying to figure out but can't come up with the proper expression or code to do what i want to.
basically when I focus on a field I want it to first check if there is any data/value in it and onyl do a DCount if there is and otherwise not (IE if the field is null skip the DCount)
I figured it would be similar to IF [Host] = 'NULL' THEN (Nothing here) ELSE (DCOUNT here)
But each time I try i get a syntax error, could anyone shed light on what is the proper code for such a thing?
I have a checkbox that has a grayed out box inside of it. What causes this/ what is it? I looked up the record and there should be a checkmark in the box. In the table it is set to have one.
I know that if the prefeances of Enables is set to No then all of the check box and the text label box is all grayed out, But in my case it is only the inner part of the box…. (And it is a Checkbox…)
The box name is ABC1 and it just reads the record, that’s it... It is used for reports later down the road. So there is not any code set to this check box.
I am looking to subtract number inside the same field. and then return the difference to a new field (column). This data is used to generate a graph and the this is currently done by hand. I know there has to be an easier way to do this.
Below is an example of what I am looking for.
I have a table called Numbers, and fields or columns called...
So what I am doing is subtracting row two from row one. The difference is then put in another field(column) in row one. The process repeats, row three from two, four from three, five from four, etc, etc. This occurs for hundreds of rows.
Is there a SQL statement that can do this? Your help is much appreciated!!!
I created a help file in access that lets you have text mesasge up to 1024 chars. Just press F1 key on any control that you have setup to bring up help message.
Does any one see any problems with the way I did this?
Form Help File: = "" Help Context ID: = 0
For each control on the form where you would like to have a help message do the following. Form Control Help Context ID: = Set to one of the help index numbers in the help table.
Add KeyDown Event to the control
Private Sub Text0_KeyDown(KeyCode As Integer, Shift As Integer) 'Add this line KeyCode = DisplayHelp(KeyCode, Me.ActiveControl.HelpContextId) End Sub
module
Function DisplayHelp(KeyCode As Integer, HelpContextId As Integer) As Integer Dim dbs As DAO.Database Dim rstRecords As DAO.Recordset
If KeyCode = VBKeyF1 Then ' 112 = F1 Set dbs = CurrentDb Set rstRecords = dbs.OpenRecordset("SELECT tlbHelp.Index, tlbHelp.HelpMessage " & _ "FROM tlbHelp WHERE (((tlbHelp.Index)=" & HelpContextId & "));")
With rstRecords If .RecordCount > 0 Then Call MsgBox(!HelpMessage, vbInformation, "Help") End If End With DisplayHelp = 0 ' Clear KeyCode rstRecords.Close Set dbs = Nothing Else DisplayHelp = KeyCode End If End Function
Create Table and Fields
Table Name: tlbHelp Field Name: Index as Number Field Name: HelpMessage as Memo Field Name: FieldName as Text Field Name: FormName as Text
How type in custom number and message for each help message.
I wonder if you can help me. In my query, for this calculated field, i get an error message about a syntax error missing operator in query expression. what did i do wrong? thanks
I've been testing my scripts so my database has a whole bunch of bogus records in it. I'd like to simply delete everything out of my orders table (there aren't any legit ones in there yet) so that I can start over when I go live and not have all that crap in there.
Is there an easy way to do this without re-creating a blank database and copying/pasting table only over?
Not sure where to start here, I have a subform which spits out query results. Next to the SERIAL field in each record I have a button (ADDSN). On my main form I have a listbox (SNLIST). I want to be able to click the button and have the associated SERIAL field be added to the listbox. I know how to add data to a listbox but I do not know how to add the data from a certain field selected records. How do I access this information?
Hi I have 5 PC clients and a server.each user upon shutting down his PC,is prompted to send all the information inside a table "Patron" to a table inside the server.That way each user backs up his information to a table inside the server and at the end of the day,the table on the server side contains all the data from the 5 PCs.I am new to access,can anyone guide me through the steps I need to accomplish this project? thanks in advance
I have a table with all my contacts. Manufacturers, distributers and outlet shops. I want to be able to make relationsships that show which manufacturers sell to which distributers and outlet shops, but at the same time I also want to be able to see which manufacturers are being sold by a particular outlet shop or distributer.
I am reading everywhere that you need to make a table to link the 2 tables together for every one relationship you have and this I understand. Most of the time it is relations between 2 tables that you want to establish. But in this case all these companies are in the same table. Can I still make a many-to-many relations ship between different items that are all in the same table using one single extra table that holds these relationships?
I have been fighting a problem with sorting the data in a subform that is in a datasheet. It is sorting the data automatically so the entries are not in the original order. Is there a way to disable the feature so that when I put data into the datasheet it will appear in the same order that it was originally.
Is it possible to use recordsets inside an sql-statement how described in following example. the error message: access can't find the table or querydef.
Code:
public function useRS (RS_ext_1 as DAO.Recordset, RS_ext_2 as DAO.Recordset) as DAO.Recordset dim sql_RS_int as string dim RS_int as DAO.Recordset
sql_RS_int = "SELECT * FROM RS_ext_1, RS_ext_2 WHERE col1_ext1 = 1 and col1_ext2 = 5" set RS_int = CurrentDB().OpenRecordset(sql_RS_int) set useRS = RS_int.Clone
I am looking for the ability to have a scrollable window inside of a tab.
My database is tabbed into categories of data.
One of these categories has more than the others.
I would like to create a rectangle inside the tabbed area which I can put the questions in but the box is too small, so instead of creating tabs inside another tab, id rather have a scrollable section inside in which I can put the questions in...
I have a sql to run and I have to use many values as parameters (over 1000), which is why I am trying to use a SQL inside a IN condition.
I am testing the sql with only 1 value for now. The parameter I am using will be 2208287. This returns in a matter of seconds.
Code: Select a.po_id, a.sku12, sum(a.unit) AS Units, sum(a.weighted) AS Weighted_Units, ((sum(a.weighted))/ (sum(a.unit))) AS weighted_turntime From( SELECT ds.src_evnt_txn_tmst AS alloc_ts, bc.src_evnt_txn_tmst AS ship_ts, ds.Po_id, Left(bc.sku16,12) AS SKU12, ds.distro_id AS alloc_distro, bc.distro_id AS Ship_distro, Sum(bc.unit_qty) AS Unit,
[Code] .....
but it does not work when I add a sql inside the IN condition. It actually runs forever and eventually I have to break it to stop. why this is not working with a sql inside a IN condition.
Also note:
table ROSS_REPORT_DISTRO_DTLS_SUM is a linked table table BOL_CONTNR_SKU16_RTED is a linked table table CopyOfdata is a local table (This is where I will put all of my values to act as parameters)
Code:
Select a.po_id, a.sku12, sum(a.unit) AS Units, sum(a.weighted) AS Weighted_Units, ((sum(a.weighted))/ (sum(a.unit))) AS weighted_turntime From( SELECT ds.src_evnt_txn_tmst AS alloc_ts, bc.src_evnt_txn_tmst AS ship_ts, ds.Po_id, Left(bc.sku16,12) AS SKU12, ds.distro_id AS alloc_distro, bc.distro_id
I've been opening comma delimited files in Access, used an Excel function to re-save those files in .xls which Access readily understands, then opening said files and running a query on them to organize them. Now the file needs to go to Excel where it is entered into a worksheet with a certain heading.
Problem is when opening the .xls converted file in Excel, no macros show up. If I open a blank worksheet in Excel my macro shows up. I lowered the security settings to the most basic level in Excel. How do I make the macro show up in the file opened in Excel through the Access VBA, so I can run it?