Access 2003 - Help with Make-Table and Append queries

I maintain an equipment inventory database in Access 2003 with just a
handful of tables and several regular queries. Each piece of equipment
has a unique 6-digit asset tag, and that field is the primary key. No
two records can have the same asset tag. Periodically equipment gets
replaced, and I am looking for a way to do the following when
replacing multiple pieces of equipment.

1. Multiple asset tags would be entered into a form or table. Their
corresponding records would be found in TABLE-1
2. Certain fields of the records found would be appended to TABLE-2
showing them as having been replaced
3. The found records would then appear in a table, query, or form
where they could be modified -- (of the twenty total
    fields, only four - Make, Model, Asset tag, Serial number - would
be modified with new data)
4. The four modified fields would then be appended to the original
record in TABLE-1 leaving all other fields untouched

I have experimented with Make-Table, Append, and Delete queries as
well as with macros. But, I do not know enough to make this all happen
the way I want it to happen. I have also entered criteria that will
prompt me for the asset tag field in a record. But, this only allows
me to enter one record at a time - which would be okay if there is no
way to do this with multiple records simultaneously. Any help would be
greatly appreciated.
0
tim
3/13/2008 9:50:56 PM
access 16762 articles. 3 followers. Follow

3 Replies
781 Views

Similar Articles

[PageSpeed] 47

I can't see why you need a second table at all; why not just open a form 
bound to the first table, filtered to show only the rows selected as ' 
replaced' in an unbound dialogue form?  The bound form need only show the 
four columns which need amending, though you could also show other columns in 
the form and lock them to prevent inadvertent changes being made to their 
data.

For the dialogue form I'd  suggest using a multi-select list box so that 
multiple asset tags could be selected, and a button to open the bound form.  
The RowSource for the list box would be along these lines:

SELECT [Asset Tag] FROM [Table-1]  ORDER BY [Asset Tag];

The code in the button's Click event procedure would iterate through the 
list box's ItemsSelected collection and build a string expression for use as 
the WhereCondition of the OpenForm method, so would be along these lines, 
where lstAssetTags is the name of the list box:

    Dim varItem As Variant
    Dim strAssetTagList As String
    Dim strCriteria As String
    Dim ctrl As Control
    
    Set ctrl = Me.lstAssetTags
    
    If ctrl.ItemsSelected.Count > 0 Then
        For Each varItem In ctrl.ItemsSelected
            ' build value list.  Numbers assumed; see below for code if text
            strAssetTagList = strAssetTagList & "," & ctrl.ItemData(varItem)
        Next varItem
        
        ' remove leading comma
        strAssetTagList = Mid(strAssetTagList, 2)
        
        strCriteria = "[Asset Tag] In(" & strAssetTagList & ")"
        
        ' open bound form
        DoCmd.OpenForm "frmRelacements", WhereCondition:=strCriteria
        
        'close dialogue form
        DoCmd.Close acForm, Me.Name
    Else
        MsgBox "No items selected.", vbInformation, "Warning"
    End If

This assumes the Asset Tag column in the table is of number data type; if 
its text amend the code as follows:

        strAssetTagList = strAssetTagList & ",""" & ctrl.ItemData(varItem) & 
""""

Ken Sheridan
Stafford, England 

"tim.link@gmail.com" wrote:

> I maintain an equipment inventory database in Access 2003 with just a
> handful of tables and several regular queries. Each piece of equipment
> has a unique 6-digit asset tag, and that field is the primary key. No
> two records can have the same asset tag. Periodically equipment gets
> replaced, and I am looking for a way to do the following when
> replacing multiple pieces of equipment.
> 
> 1. Multiple asset tags would be entered into a form or table. Their
> corresponding records would be found in TABLE-1
> 2. Certain fields of the records found would be appended to TABLE-2
> showing them as having been replaced
> 3. The found records would then appear in a table, query, or form
> where they could be modified -- (of the twenty total
>     fields, only four - Make, Model, Asset tag, Serial number - would
> be modified with new data)
> 4. The four modified fields would then be appended to the original
> record in TABLE-1 leaving all other fields untouched
> 
> I have experimented with Make-Table, Append, and Delete queries as
> well as with macros. But, I do not know enough to make this all happen
> the way I want it to happen. I have also entered criteria that will
> prompt me for the asset tag field in a record. But, this only allows
> me to enter one record at a time - which would be okay if there is no
> way to do this with multiple records simultaneously. Any help would be
> greatly appreciated.
>

0
Utf
3/13/2008 10:59:00 PM
On Mar 13, 5:59 pm, Ken Sheridan
<KenSheri...@discussions.microsoft.com> wrote:
> I can't see why you need a second table at all; why not just open a form
> bound to the first table, filtered to show only the rows selected as '
> replaced' in an unbound dialogue form?  The bound form need only show the
> four columns which need amending, though you could also show other columns in
> the form and lock them to prevent inadvertent changes being made to their
> data.


Ken, Thank you for your quick response. Regarding the second table,
maybe I
wasn't as clear as I should have been in my original post. The second
table
(TABLE-2) already exists in my database and is basically a list
showing all of
my old equipment surplus.

When the asset in TABLE-1 is replaced, a few fields from that record
need to be
added to TABLE-2 to show which assets were replaced on what date. So,
I just
thought that since I would be entering the old asset tag numbers once
at the
onset, it would be nice for the information to be copied into TABLE-2
during the
process.

What I would be left with is TABLE-1 containing the new, updated
asset
information and TABLE-2 containing the asset information of the
equipment
which was replaced.
0
tim
3/14/2008 4:30:13 AM
You could expand on what I suggested so that each record in the bound form is 
appended to table 2 before you edit it, using a query such as:

INSERT INTO [Table 2] 
(Make, Model, [Asset tag], [Serial number]) 
SELECT Make, Model, [Asset tag], [Serial number] 
FROM [Table 1] 
WHERE [Asset tag] = Forms![YourForm]![Asset tag];

I'm not sure from your post whether these are the only columns to be 
inserted into table 2 or the only columns to be amended, but its simply a 
question of adding to the two column lists in the query if there are more.

You can run the query from the Current event procedure of the bound form.  
This will insert a row into table 2 as you navigate to each record in the 
form.  You could make the execution of the query conditional on the response 
to a message box if you want user confirmation before inserting each row into 
table 2.  This would help prevent any accidental insertion of a row into 
table 2 if you should find you've inadvertently selected an item not to be 
replaced when making the multiple selections in the list box in the dialogue 
form.

Ken Sheridan
Stafford, England

"tim.link@gmail.com" wrote:

> On Mar 13, 5:59 pm, Ken Sheridan
> <KenSheri...@discussions.microsoft.com> wrote:
> > I can't see why you need a second table at all; why not just open a form
> > bound to the first table, filtered to show only the rows selected as '
> > replaced' in an unbound dialogue form?  The bound form need only show the
> > four columns which need amending, though you could also show other columns in
> > the form and lock them to prevent inadvertent changes being made to their
> > data.
> 
> 
> Ken, Thank you for your quick response. Regarding the second table,
> maybe I
> wasn't as clear as I should have been in my original post. The second
> table
> (TABLE-2) already exists in my database and is basically a list
> showing all of
> my old equipment surplus.
> 
> When the asset in TABLE-1 is replaced, a few fields from that record
> need to be
> added to TABLE-2 to show which assets were replaced on what date. So,
> I just
> thought that since I would be entering the old asset tag numbers once
> at the
> onset, it would be nice for the information to be copied into TABLE-2
> during the
> process.
> 
> What I would be left with is TABLE-1 containing the new, updated
> asset
> information and TABLE-2 containing the asset information of the
> equipment
> which was replaced.
>

0
Utf
3/14/2008 12:33:01 PM
Reply:

Similar Artilces:

Reporting from Project Server
I dont know if i need to ask this question here or in the Access section. I have an ODBC connection to the Project Server database so I can make reports through Access. Access' limit of 255 fields per table is causing me some trouble. for example, the MSP_VIEW_PROJ_PROJECTS_ENT table has well over 255 fields. Access only shows me the first 255 fields. how can I change that so I can see all the fields in that table? thanks, Hadi Hadi, I have not tried this yet it may be a viable option. Have your DBA create a view that pulls the key fields to this table and the specifi...

Looking for Excel Help
I'm a very novice Excel user and am looking for a little help with creating a formula for a spreadsheet I'm creating for my personal use. I would appreciate some assistance if possible. Thanks in advance. Dan --- Message posted from http://www.ExcelForum.com/ Hi Dan! Post a sample of what you want to do. Your question is just a tad open ended <g> -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "DanB4105" <DanB4105.ywtpa@excelfor...

New to excel
Hi All, I'm new to Excel ( and to this forum :) ) and so I hope somebody may b able to help me. I've got 2 questions.... QUESTION 1 I've got a spreadsheet which takes data from one worksheet and uses i to calculate data in a second worksheet using the following code formula: =IF('4th November 2005'!B19="","nothing here dude",IF(B19<'4th Novembe 2005'!B19,"UP",IF(B19='4th November 2005'!B19,"Same",IF(B19>'4t November 2005'!B19,"DOWN")))) The problem is, when I create a new worksheet I have...

Need Help, Task Start Date is wrong
I’m using MS Project 2007, have several task linked with finish to start. I have set date to schedule from, hours per day set to 8 and Working Monday thru Friday. My schedule shows Task 1 Duration 4 days, start Wed 6/2/10, Finish Mon 6/7/10 Task 2 Duration 3 days, start Mon 6/7/10, Finish Thu 6/10/10 Task 2 should have a Start Date of 6/8/10 not 6/7/10; what is causing this? Thanks in advance for your help. ...

From Outlook 2000 to Outllook 2003
How do I migrate I personal folders file (.pst) from Outlook 2000 to Outlook 2003? Read the Help Files: http://office.microsoft.com/en-us/assistance/HA010771141033.aspx -- Russ Valentine [MVP-Outlook] "rolo" <rolo@discussions.microsoft.com> wrote in message news:706405A0-2971-409F-B213-67714B12713C@microsoft.com... > How do I migrate I personal folders file (.pst) from Outlook 2000 to > Outlook > 2003? Thanks Russ it helped. By the way how can I get to this useful help files? "Russ Valentine [MVP-Outlook]" wrote: > Read the Help Files: > htt...

How do I Remove a Split from my Comments in Excel 2003? #2
I have set my current workbook to split/freeze the first column and first 2 rows. Now, when I add a comment to the second row (in any column) my comments are cut off if I should scroll down. I don't ever remember the behavior before. And I don't know what I've done to enable it but it's really annoying. How do turn this off ? ...

unable to paste Excel 2003 chart into Outlook 2003
(This was posted on "excel.charting" group.) I have a user who's unable to paste an Excel 2003 chart into Outlook 2003 email message. In Outlook options, the checkbox is selected for "Use Microsoft Office Word 2003 to edit e-mail messages". When I tested this on my own computer running the same version of Office, if the box is check, I have no problem pasting; if this box is cleared, I cannot paste. But on his computer, it doesn't work regardless. Thanks and regards, TL ...

nested OR in queries
I have a table that has 20 date fields for each record. I need to select any record that has a matching date in at least one of those fields so it becomes a huge OR in a query and I have noticed that I am limited to 9 in a query. Is there a way to do this efficiently or will I need multiple queries to test all 20 date fields? If your table uses multiple date fields, the first thing you'll want to consider is coming up with a new table! In a spreadsheet, adding 20 date fields may be the only way to handle a situation, but you won't get the best use of Access' features and funct...

Outlook 2003 Drag and Drop Emails
I have an issue where there is a SBS 2003 server (newly installed) & when I drag emails to the file system (explorer window) in order to create file records of the emails it generates an error. Dialog Box Name: Error Copying File or Folder Error Msg: Not enough storage is available to process this command. I can't find an error logged anywhere, either on the server event logs or on the local machine event logs... I have searched the MS KB & Office online, but no joy yet... If anyone can help that would be great!!! R ...

Redirect Exchange 2000 IS backup to different Exchange 2003 server
I recently added an Exchange 2003 server to the same org as a 2000 server. I have dbs from the 2000 server that I need to restore to retrieve email from a user whose mailbox was moved to 2003. So I need to restore the db for that mailbox from BEFORE it was moved because when you move mailboxes you lose any deleted items that were being saved by retention policy. Is this possible? I'm using Veritas Backup Exec 10 but nothing in their support KB seems to follow this exact scenario. If it helps, the old Exch 2000 server is currently empty of users and is ready to be uninstalled. W...

will CRM load on a 2003 server?
will CRM load on a 2003 server? Microsoft CRM v1.2 supports Windows 2000/2003 Server. Frank Lee Workopia, Inc. >> Other Microsoft CRM Online Forum Resources: http://www.workopia.com/Links.htm >-----Original Message----- >will CRM load on a 2003 server? >. > No problem. We just completed a 1.2 installation on a 2003 server, without any problems. Brian Demoe "Troy Hicks" <tlhicks@nc.rr.com> wrote in message news:03dd01c3dcb2$93653a00$a501280a@phx.gbl... > will CRM load on a 2003 server? CRM 1.2 will also load on Small business server 2003 as wel...

Please help #8
I have Exchange 2000 and Outlook 2003 in Cache mode. Has anyone seen this or know how to fix it? Task 'Microsoft Exchange Server' reported error (0x8007000E) : 'Out of memory or system resources. Close some windows or programs and try again.' "John S" wrote: > > I have Exchange 2000 and Outlook 2003 in Cache mode. Has anyone seen this or > know how to fix it? > > Task 'Microsoft Exchange Server' reported error (0x8007000E) : 'Out of > memory or system resources. Close some windows or programs and try again.' > >...

setup Windows Mail as Word 2003 default emailer
All I can do is setup Outlook. I do not use Outlook. I would like to email Word docs using MS Windows Mail (new version of Express) In the Windows Start area, type Regedit into the search bar and then start the Registry Editor and go to HKEY_CURRENT_USER>Software>Clients>Mail Right Click on the (Default) item and then on Modify and in the Value data: field enter Windows Mail so that after you click OK, you have (Default) REG_SZ WIndows Mail -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a pa...

Filters not working in Exchange 2003
I have been trying to turn on the Recipient, Connection, and Sender filters. I have gone to the Default SMTP Virtual Server and turned it on there without getting an error but when I go to the Properties and add senders to block and the hit Apply, it tells me that I must manually turn the filtering on in the SMTP VS. I have stopped and started the Default SMTP VS but still no luck. Any ideas? Hi Wayne That is a standard dialog box, it does not check to see if it is already enabled, have you tested the sender filtering? -- Mark Fugatt Microsoft Limited This posting is provided &quo...

SBS 2003 RWW & Windows 7 64 bit
Need help remotely connecting to 64 bit clients connected to SBS 2003 SP2. I have installed KB926505 (Vista compatabilty) on the server. When I try to establish the connection to the 64 bit machine using my 32 bit windows 7 laptop, I get a dialog box titled remote desktop disconnected. On the Windows 7 64 bit machine I have checked remote connection properties and also the advanced firewall properties, inbound connections remote connections are enabled under the domain profile. What am I missing? Thanks, So let me understand this? sorry I have a cold and it's hard for m...

Status in table PurchaseOrderEntryDetail
Hello, We're trying to populate serial # into the PurchaseOrderEntryDetail table and run across the column 'Status'. What are the possible values for Status column in this table? Most of the time we see status of '2'. What does that mean? Please help. Many Thanks & Best Regards, Nikki ...

Are Exchange 2003 OWA Backups necessary
Is there a real need to backup OWA with the DR option available with Exchange 2003? There are no stores running on this box. -- Thanks Paul Paul, I am not sure I understand the question. OWA is just away of accessing your mailbox via a web browser, so by backing up the Exchange servers hosting the mailboxes you are backing up what you can see ia OWA. When you state that "there are no stores running on this box", what box are you reffering to ? Is it a front-end server ? Regards Paul Ford Edge IT Ltd "Paul Bergson" <pbergson@allete_nospam.com> wrote in...

Access to User Calendar
I have a user called small conference room that is used to schedule meetings on its calendar. I would like to link the calendar from our intranet site to the calendar with a UNC path. I am calling outlook: and I can get to my local mailbox and public folders but I am unable to connect to another users calendar. I am running Exchange 2003 and Outlook 2003. Is there some security modifications that need to be done? Any help is appreciated. Thanks, Steve I believe that you will need full mailbox rights. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!&...

Recreating site/directory connectors on 2003?
Just got the first 2003 server up and running. We have a single domain, and two sites/admin groups. SiteA contains the current 5.5 server (ServerA) and the new 2003 server (ServerB). SiteB contains a single 5.5 server (ServerC). There is a site connector created under 5.5 between SiteA and SiteB with ServerA and ServerC as the bridgeheads in each site. There is also a directory replication connector between SiteA and SiteB, again with ServerA and ServerC as the bridgeheads in each site. The ADC is installed and working with the default mailbox/public folder CA's for both SiteA ...

microsoft.public.access.conversion
...

Table of Contents for each section
I have tried several times to create a TOC for each section of my document. They way it is now I can simply go to the Insert a TOC and it will insert e perfect TOC. All my text has been changed to the appropriate Level and I have no problem there. But I need to seperate the chapters to the start of their respective sections (I have next page breaks inserted at the start of every chapter). I have tried the bookmark method, no luck. I have tried other methods but I think my problem is that I have selected the appropriate fields and changed their levels appropriately. I have not mes...

Pivot Table Question #5
How do I make the row headers show up in front of each row on pivot table instead of just once on the first row of a section? Thanks Try this: Copy the pivot table Do a Paste Special > Values into another sheet Ensure that the top left cell is A1 Run the Sub FillBlanks() below (from MVP Debra D) Sub FillBlanks() 'by Debra Dalgleish 7-Dec-2001 'fill blanks cells with data from above Range("A1").CurrentRegion _ .SpecialCells(xlCellTypeBlanks) _ .FormulaR1C1 = "=R[-1]C" Range("A1").CurrentRegion.Copy Range("A1").PasteS...

form fields not saving to table
I have created a database with a form and three of the fields are not saving the information to the table. I have checked the row and control sources and now at a loss and thoughts? As you scroll through existing records is the data of the table displayed? Post the SQL of the query or form source. -- Build a little, test a little. "Kim" wrote: > I have created a database with a form and three of the fields are not saving > the information to the table. I have checked the row and control sources and > now at a loss and thoughts? > > ...

How to set "licence" for Access 2007 database?
Hi I developed an Access 2007 db to a client. Now I want to make a year based licence for that database that the client must pay if they want to continue using the database after year. It must be so that database cannot be used after this date. How I can accomplish this? Thanks! On Mon, 12 Apr 2010 13:14:17 -0700 (PDT), Sandroid <santeri.virtanen@gmail.com> wrote: >Hi > >I developed an Access 2007 db to a client. Now I want to make a year >based licence for that database that the client must pay if they want >to continue using the database after year. It mu...

Help with importing data
Can I have users fill in a form in Access and have that data be transferred and updated to a spreadsheet. Need for fill out several fields and then export to a specific spreadsheet and place that data into the cells that will update that cell (add to the total in that cell) of a spreadsheet. ...