I am on release MS Access 2002. I need to be able to import a spreadsheet of data into a existing table in an access database. I am doing this by using the DoCmd.TransferS preadsheet command.
The input spreadsheet data includes a date column (invoice date) which may or may not be populated. This column is formatted as a 'text' data type in the excel spreadsheet.
The database table that I have to load the data into (using...
User Profile
Collapse
-
ncsthbell started a topic How to import excel spreadsheet with date column blank into table with date datatype?in AccessHow to import excel spreadsheet with date column blank into table with date datatype?
-
ncsthbell started a topic How to run update query to read one table and update a value in a related table?in AccessHow to run update query to read one table and update a value in a related table?
Our business is changing the current employee UserId's to a new value. I am trying to build a query that will read the current user table, find the matching row in the new user table & update the existing userID with the value of the new userID in the new table. I want the query to run against all the rows to do the updates.
I have tried to build an 'update' query that would read the 'strUserID' from tblUsers and grab the matching... -
On the form, I am selecting a Division from the combo box, I assume this is what is triggering the Before_update event. -
I put the cancel=True in my code before the Exit Sub so my code looks like this:
Code:If vGroupRqd = True Then If IsNull(cbo_Group.Value) Then MsgBox "Group is required for this Division.", , "Select Group from drop down list" [cbo_Group].SetFocus cancel = True Exit Sub End If End If
Leave a comment:
-
Rabbit,
The divisions and groups are in two different tables and some groups can belong to multiple divisions so setting the field as required in the table does not work in this situation.
But thanks for the suggestion!Leave a comment:
-
Seth, I did put the code in the before update event on the form and I check to see if null. I do have an if/then/else test to see if the division has groups wrapped around the code I have above. How do I 'cancel'? Haven't used this before. I have always used 'exit sub'.Leave a comment:
-
How to require user to select value from combo box?
MS2007 - I have 2 combo boxes, 'cboDivisions' & 'cboGroups'. User selects the division from 'cboDivisions' but not all Divisions have groups associated. If there are no groups for the selected division, I set cboGroups invisible property. The problem I am having is my users are not always selecting a Group for a Division when there are some present. I want to force them to select a Group when the Divsion had them. I have put some code in the... -
How to get cascading combo boxes to work properly?
I am using MS Access 2007. I have a form that has two combo boxes, one for divisions, the other for groups. I am trying to create ‘cascading’ boxes that will allow a division to be selected and will populate the ‘group’ combo box with all the groups for that division. I have read on the internet about cascading combo boxes and have created mine the way I have seen in some other examples. My problem is that the ‘group’ combo box is... -
ncsthbell started a topic How can I set a form data column to allow value to be entered but not updated?in AccessHow can I set a form data column to allow value to be entered but not updated?
I am on MS Office 2007. How can I set the data column property on a form to allow a user to enter a data value in the column to perform a ‘find’ but not change the table data for the record that is currently displayed on the form?
When the form is opened, the columns are populated with the first row in the table that is defined to the form as the recordsource. The user wants to be able to enter a value into a particular column... -
Nice to know I am not the only one that deals with these older databases. In our case, we had users that were allowed to create any access database they wanted. Then, with MS2007, they were given 'runtime' only access. Given that, the IT dept. inherited all of these databases to support. It has been a nightmare! Slowly, one by one I am figuring them out!Leave a comment:
-
There are references to the tables in the active database, however, when I open the main menu and click on the exit button, the table has not been opened.
I will have to check with our tech support group to find out what the lock options are set to on the installation.
I found out that the reason the person that wrote this is doing these exports is to update a 'read' only version of this same database. So, what they have is the same...Leave a comment:
-
ncsthbell started a topic Getting run-time 3009 error on "DoCmd.TransferDatabase acExport" statementin AccessGetting run-time 3009 error on "DoCmd.TransferDatabase acExport" statement
I am using MS2007 on windows XP. I support an access application which has a 'main menu' (form) and on this form there is a button 'Exit Database'. In the 'on click' event code for the 'Exit Database' button the following is code is executed to copy a table to another database:
Code:DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\Inv\ITH.mdb", acTable, "HWI", "HWI"
-
When using macro to close form, how do I force the 'prompt' on save?
I have an MS2007 access database. On one of the forms that is used to edit/change data, there is a button 'Return to main menu'. Once the user has finished making the changes on the form and clicks on this button, it runs a macro to close the form and open the main menu form. On the 'close' form it has the has the following:
Object Type: form
Object Name: DataEditInvento ry
Save:Prompt
From what I have... -
Sorry, I apologize. I just re-read my post and I realize that I did kind of get off of the 1st post I made and made it a bit confusing. It all revolves around the same issue I was having, but should have been separate posts.
I am trying to figure out what the bar on the left of the form is that shows a 'pencil' once any data on the form has been changed. I don't want to display this bar with the pencil but instead put a button on the...Leave a comment:
-
This sounds like exactly what I need to do. I like the suggestion to store the record in a table and then append it to the history table. In the 'Forms before update' event code, how do I test to see if it is a new record or an update to the current record?Leave a comment:
-
All of the columns on the form are 'bound'. There is no code behind the form except for code that pertains to some combo boxes to handle 'not in list'. I want to detect when a data column value has been changed and capture the original value to store as history. I put code behind the 'before update' event of the data column and a 'stop' so I could look at the column value. The column value (txtDataCol1) contains the new value I just typed in. Since...Leave a comment:
-
Nothing is working correctly. I am not familiar with the form having a bar on the left side with a pencil showing up when a change it made. I need to figure out how this is done and how to get rid of it so I can control the save. I wonder if it is because the forms columns are 'bound'?Leave a comment:
-
How to change form to allow control of saving record changes?
I have inherited an access database that has the forms designed so when a user makes a change in any column(text box), there is a bar on the left of the form and a pencil appears. If the user does not click on this pencil, the changes are not saved and there are no warning messages. We have found that lots of changes have been lost due to user's not clicking on the pencil. I have been asked to change the forms to put a 'Save record' button on the...Last edited by TheSmileyCoder; Apr 18 '11, 07:54 PM. Reason: Fixed your attempt to use [Code] tags. Use [/Code] as closing tag. -
ncsthbell started a topic When running access .mdb on network, can form properties be set for individual users?in AccessWhen running access .mdb on network, can form properties be set for individual users?
I am running MS Access 2007. If I have an access application running on a network can I control the read/write access for the data by setting the form properties to yes or no for "Allow Additions", "Allow Deletions" & "Allow Edits" based on the user's login? Not sure how access would handle the form properties if it is on the network and shared. If one user is logged in and has 'read only' access and I set these... -
How to set parameter on query when using DoCmd.OpenQuery
Using MS Access 2007. I built a form that has a combo box of lists of 'actions' (cmboActions). This form also has a button to click that I want to run a query and display the results in datasheet view.
I am trying to pass the value from the cmboActions box to the query via the following method:
Code:Dim qdf As QueryDef Dim rst As Recordset Set qdf = CurrentDb.QueryDefs(qry_ActionTaken_parm) qdf.Parameters(0)
Last edited by NeoPa; Mar 23 '11, 12:49 AM. Reason: I'm astounded you're still not using the CODE tags. They are required to post here!
No activity results to display
Show More
Leave a comment: