ms-access-2007

convert memo field to text and eliminate excess spaces

Hi,I tried looking this up in google, but couldnt find any anything... I am running Access 2007/XP/SQLBASE and need to make a query that converts a memo field to text and eliminaes any spaces more than 2 spaces long. Please give me the SQL, based on my snippet below. the memo field is called "BITS". I used to be able to accomplish t...

is it possible to password protect ms-access 2007 file without encryption

Hi, I have a large 1.3 GB accdb file to which I added security by password protecting it. Accdb file enforces encryption along with password protection so now i am not able to Compress it with winzip. Is it possible to password protect that file without encryption. Any help is greatly appriciated as both are must for the work i a...

Access 2007 - Why won't Access work on workspaces/web folders?

So if I try to take an Access database that currently resides on a network shared drive (or try to create a brand new one for that matter) on a web folder of a "workspace", why won't it work? I have read, write modify permissions on the folder I am trying to add it to, however I can errors, and it won't recognize the file type (.accdb or...

Referencing global variable - MS Access

Hi, Im trying to pass the name of a global variable to a sub routine and would like to know how to reference it. For example I could do the below with a control: Private Sub passCtrlName(ctlName as String) Me.Controls(ctlName) = "Whatever" End Sub Edit: For Example Public imGlobVar As String Public Sub passGlobVar(frm as Form, ctlN...

MS Access 2007 Converting forms into sub form - "form not found" issue

So I recently have been trying to incorporate more sub forms to make the UI more friendly. So I have a pre developed form that runs some VB, so for examples sake lets just say that it runs SQL statement, returns the recordset, and fills text boxes with the data (because this is sort of an interactive dashboard concept: dim db as databas...

Access 2007 upgrade DAO references conflict

I am updating an Access 97 DB w/ VBA code to Access 2007. The VBA code uses DAO objects that Access 2007 references when I converted the db files (first from 97 to 2002, then to 2007). My problem specifically is with the two references: "Microsoft DAO 3.6 Object Library" and "Microsoft Office 12.0 Access database engine Object Library...

open file from path stored in access db when user clicks button on form

I'm new to Access VBA development and being asked to debug and add features to an Access 2007 application that two previous developers worked on. A form displays records from a database and shows a button for each record. The button is supposed to open a file using the appropriate path. But when the user clicks the button, it always use...

Running an external script from Access

Hi all, I want my Access application to run an external program (in this case a R script) after the user clicks a button. I use this code: Dim RetVal RetVal = Shell("""C:\Program Files\R\R-2.10.1\bin\R.exe"" CMD BATCH --no-environ --silent --no-restore --no-save ""c:\test.R"" ""c:\test-result.txt""", vbHide) MsgBox RetVal This works ...

Trying to improve performance by removing DLookUp - Access 2007

Hi there, could anybody possibly give me some pointers as to the appropriate method to use here. -Edit I have fields in a form that relate to a users 'risk address', and I have a checkbox that updates the values in these fields that if selected loads the 'contact' details (from the table tblInsPersDet) into these fields. If the checkbo...

MS Access 2007 - Cycling through values in a list box to grab id's for a SQL statement

Lets say I have two tables, one for transactions, and another table who's primary key is the foreign key in the first table, and this relationship simply associates locations to transactions. I have a form with a list box that shows all the potential locations, so that the user can open some dashboard forms that only pertain to a given ...

accdb vs mdb access database file

what is the difference between these two extensions? i need to write to an access database from a WORD file using an ADODB connection when i create a new access database it gives me the option to make only an ACCDB file and for some reason i cannot make an MDB file can someone please help me create an MDB file so that i am able to ma...

Access 2007 - Docmd.OpenForm not opening form, OpenArgs??

So I am trying to use a button click to open the next form (in my form flow), and pass the ID to the next form using openArgs: docmd.openform "NextForm",,,,,, MainID docmd.close acform, "CurrentForm", acSaveYes the second form will not open....i have never run into this problem with a docmd.openform in a sub before. however, this is m...

MS Access 2007 - OpenArgs not passing the value to next form???

So I pass the ID value from one form to the next using Docmd.OpenForm "SecondForm",,,,,, MainID Docmd.Close AcForm, "FirstForm", acSaveYes and then I check the value on the Second Form's load event: MainID = val(Me.OpenArgs) and when I debug and step through I hover over this and can see it contains a value Then I have a button cl...

MS Access 2007 - DAO method question... rs.update with an option group

I am using rs.update to change some values. something like rs("SomeField") = frmSomeOptionGroup.value where I want the actual option value to be stored in the table. however this just simply seems to return true or false values to the table instead of 0-2.... so what should I do to make this concept work? thanks justin ...

time stamp field to output records from last 24 hours

I need to make an Access query output records that were only from last 24 hours. The field called " SYSADM_CUSTOMER_ORDER.CREATE_DATE" is the time-stamp field. I cant use the criteria ">date()-1", because that would give me records from after 12AM the previous day and I need to run the query at 4PM every day and only output records fr...

access 2007 bug - intermittent query parameter prompts

I am working on an Access 2007 application that was created by someone else. It has a strange, intermittent bug in which it prompts the user for query parameters when the main form is opened. The query parameters are clearly not necessary, because the error does not always occur. The very strange "fix" to this problem is to open and clo...

How to loop through all controls in a form, including controls in a subform - Access 2007

Hi there, As the title of my question suggest, how is it possible to loop through all the controls in a form, including subforms. For example I use the below sub routine to set the background colour of controls with the tag * Public Sub colCtrlReq(frm As Form) ' Sets background color for required field -> Tag = * Dim setColour As St...

Access 2007 to Oracle 10g linked table -- query with flawed results, but no errors thrown

Access 2007 databases querying linked oracle 10g tables are returning flawed result sets when using the WHERE clause to filter-out unwanted records. Oddly, some filtering is happening, but not reliably. I can reliably demonstrate/produce the problem like this: Create a *new* database with Access 2007. Create a second *new* database w...

How do I convert an incoming object to binary in Access 2007 VBA?

I need to import PDF and XLS objects and convert them to binary. The following code doesn't work, apparently because the "fd.SelectedItems(1)" is the path of the object instead of the object itself. If I dim "fileToUpload" as an object, I get a "run time '91' Object variable or With block variable not set". If I don't specifically Di...

using macro to send reports via email with gridline borders between records

I do not knw VBA and would like to know if I can, with my limited knowledge, use the send-object command (or another command)to email Access reports, with gridline borders in between the fields in my output. I currently have the macro email format set to html. ...