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. 2 followers. Follow

3 Replies
588 Views

Similar Articles

[PageSpeed] 22

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:

Restricting access to note attachments
Hi all, is there a way to restrict access to attachments on notes to specified users. I know we can, using the Security Roles, define who can and can't read/ write the notes fields but we would like our users to be able to view the note, but not open the attachment(s) unless they are the owner of that note (or at least in the business unit, etc.). I know this could be done for Word/ Excel files in Office (Password protection) but are looking for something more encompassing for all attachments inside CRM. Thanks, -- Matt Pring On Oct 21, 3:54=A0pm, Matt Pring <MattPr...@discus...

Outlook Web Access AutoSignature
I would like to know if it's possible to have autosignature in Outlook Web Access, and if so how to implement it. If anyone can help, it would be greatly apreciated. Thank You. It depends on the version of Exchange - Outlook Web Access is a function of Exchange, not Outlook. Exchange 2003 does this natively, previous versions may have a third party add-in that will allow users to do this. For better information, post in an exchange group such as microsoft.public.exchange.admin. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due t...

Menu Change back to 2003
Does anybody can tell me how to change the word word 2007 menu back to word 2003 menu?Word 2007 is a nightmare for me! Hi Bo, You can't. However, there are various Add-ins that people have produced to mimick the old toolbars. -- Cheers macropod [Microsoft MVP - Word] "Bo" <Bo@discussions.microsoft.com> wrote in message news:D2269CDD-43F0-4138-BB86-07E685A1AFA8@microsoft.com... > Does anybody can tell me how to change the word word 2007 menu back to word > 2003 menu?Word 2007 is a nightmare for me! As macropod suggests there are add-ins that mim...

Exchange 2003 Email forwarding by Schedule
Hi, I have been looking for some VB code example, without any luck, on forwarding Exchange 2003 email accounts to another email account within exchange using a script. I need to forward and unforward on a schedule. Can anyone direct me to some info that would help me acheive this. Regards Brent Might not be a good solution but: AD Attrib altRecipient is the forward to option. You can easily put a script in place that will modify this value to a single user and then schedule the script to change the forward to as required. Of course AD replication is required after the change and it ...

outlook 2003 custom rules and spam filtering
I'm trying to set up rules to move emails from different accounts to different folders. The rules work fine except that spam filtering is not being processed on the accounts that get moved. In other words, I have one "main" account that I have go to the inbox - it has the spam rules apply. The other "secondary" rules go to specific folders - they do not have the spam being processed. Sounds like my custom rule is pre-empting the spam filter rule(s). Is there a way to chain the two together so that spam filtering happens first and then the mover (or vice versa ...

Access 2003 and Access 2007 Synchronization
I'm setting up a new business relationship with a company in Portugal. They use Access 2003. I have just bought MS Office Professional 2007 (with Access 2007). Our plan is that they will send, once a month or so, their Access db then we will update and add to that db and then return it after another month or so. There probably won't be a lot of updates on our end so the monthly cycle should work. After they synchronize, they will send a new version of the db and we will start over. My goal is to keep everything as simple as possible partially because I don't know how skillf...

Excel Row to Access Columns
Hi, I have a single row in Excel with a lot of data, what I need to do is move that to a column in Access. I need some way to automate that. I know the easiest way to do that would to just transpose it in excel and then import in access.But I cant do that as I just get that excel file with one row and I need some way to automate the process in Access. thanks m -- mk389 ------------------------------------------------------------------------ mk389's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15272 View this thread: http://www.excelforum.com/showthread.php?...

Hot link in office outlook 2003 inoperatable
When I click a hot link in my Outlook 2003 I don't get any action, what settings do I need to make this happen, I always could perform this in Outlook Express all versions. Hot Links that are in blue letters. John in Ks ka0mow wrote: > When I click a hot link in my Outlook 2003 I don't get any action, what > settings > do I need to make this happen, I always could perform this in Outlook > Express all versions. Hot Links that are in blue letters. John in Ks You mean a "Hyper link, not a "hot" link. Have you installed IE7? -- Registered Linux User no 24...

How do you make a two page purchase order?
I am using a Purchase order template, and the order needs to be 2-3 pages long. How do I continue the page on to another page and have the ending total be correct? If the sheet formulas are working correctly, then just put page breaks at the spots you want the new pages to begin. -- Gary''s Student - gsnu200713 ...

Pivot table subtotals 100%
This is what I want: Apples ...

How to remove the Outlook 2003 system tray icon
Hi, Somebody please tell me that there is an option to remove the rather redundant icon Outlook 2003 places in the system tray area! I've been through the options many times but can't seem to find any way of getting rid of it. Thanks muchly Paul You can't get rid of it. You can however hide it. Just right click the Task Bar. Choose Properties. Choose Customize. You can set the Outlook Icon to always hide (in Windows XP only). -- Patricia Cardoza Outlook MVP www.cardozasolutions.com Author, Special Edition Using Microsoft Outlook 2003 ***Please post all replies to the new...

Excel, ODBC and creating queries
Does anyone know of a way to create a query based on values or formula in a spreadsheeet? Thanks in advance, J -- Message posted from http://www.ExcelForum.com From reading between the lines of your post, I am guessing that you have an Access Database with which you want to create a query based on a spreadsheet. If this is the case, you will need to open your database and in the tables section of your databse , right mouse click in the area showing your table names, and select "Link Tables" from the menu. Once you have followed the rest of the steps in the link wizard, a...

Access
Hi My form takes a few moments to load up as it is fairly substantial SQL statement is there a way to get something to display a graphic or 'loading...' message to appear why it calculate the contents? Steve ...

Outlook 2003 setup
Thanks for the help so far, everyone. Is there a way to get outlook to send/receive email from a free yahoo account? Ta. Check out this site: http://www.ypopsemail.com/ "cameleonkelle" <cameleonkelle@discussions.microsoft.com> wrote in message news:9FA06750-130F-44EA-B114-063B88DC6FC9@microsoft.com... > Thanks for the help so far, everyone. > Is there a way to get outlook to send/receive email from a free yahoo > account? > Ta. ...

access mail on WEB
Is there a way i can check emails from exchanger server 5.5 from an internet browser. I have Exchange 5.5 in win NT 4.0. Thanks! Yes - install OWA (Outlook Web Access) and open up the needed ports in your firewall (80 for http; better to use SSL and port 443 instead). disk0nek wrote: > Is there a way i can check emails from exchanger server > 5.5 from an internet browser. > > I have Exchange 5.5 in win NT 4.0. > > Thanks! ...

Making Errors Bubble Up From Other Apps?
I've got code running behind an Excel command button. The code instantiates a copy of MS Access and then runs routines in the MS Access .MDB. The .MDB has error handling, but it's running out of sight of the Excel user and I can't figure out how to make it pass any errors it has up to my Excel code, so I can handle them there (i.e. format the message and pop an error reporting dialog to the user). Anybody been here? -- PeteCresswell ...

Money 2003 password problems
Hi, I run Windows XP and Money 2003. I recently moved all my "c:\documents and settings" to another drive, which involved me having to make registry changes so windows knew where the "My documents" and "Shared Documents" had moved to. Everything worked fine, although I had some problems with MS money after the move so I uninstalled it and reinstalled it again (the exact same version). Since I have reinstalled it, the password I used to use to open my money file is not recognised. I am 100% certain that I am using the correct password. I tried using salv.exe to...

access or mount mirrored hard disks
Hi, is it possible to access a mirrored harddrive? or mount the mirrored volume by using api or mfc commands? Thank you in advance Wimpi ...

Unique distinct count in pivot table?
I have the following table with fields "Name", "State", and "price": Name State price Mary OH 14.94 Mary OH 15.01 Joe WA 12.17 Joe WA 18.95 I create a pivot table putting State in the row area and Count of Name in the data area. I get the following results: State OH 2 WA 2 This is telling me the number of occurrences of a name in the table in a given state. What I want it to tell me is the number of different names in a state. Is there an elegant way to do this in a pivot table? Much thanks for any help. A pivot table won't calculate a uni...

can you make one worksheet update another
I have two similar worksheets within the same workbook. One sheet is sorted by name and the other sheet is sorted by a date for a speicfic name. Is there a way to change the date on the sheet, sorted by name, and that will automatically find the name on the other sheet(sorted by date) and change the date to the second sheet? Jaime, The normal way is to have one table, and sort it as needed when needed. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Jaime S." <Jaime S.@discussions.microsoft.com> wrote in mess...

CRM v4 Accessibility Improvements
Hi all: Does anyone know if any improvements have been med to CRM v4 in the area of accessibility for handicapped users? One of my customers has a user who is blind and they need to make the software accessible to him. Thanks in advance for any and all help. John. Hi John, We have added following Accessibility features in CRM 4.0 : 1) High Contrast Mode (Tools --> Options --> General Tab --> Enable high contrast settings) 2) All the Form input elements have <LABEL FOR> to aid in screen readers. 3) All the Images have a ALT tag (for non text elements) etc. Thanks! Ma...

Access Database In Great Plains
I was wondering if anyone knew how to have the databases that are stored in access transfered over to great plains. I'm current running version 8.0 any help would be greatful. thanks Search Customer Source for integration Manager. MS Access databases can be used as a data source. Vincev "jake" wrote: > I was wondering if anyone knew how to have the databases that are > stored in access transfered over to great plains. I'm current running > version 8.0 any help would be greatful. thanks > > Hi Jake, Is this something you need to do regularly or is it ...

Upsizing Access to SQL Server 2000
Hello, I am new to SQL Server. I am trying to use the Database upsizing wizard to upsize a Access 2000 database into SQL Server 2000. They are both on the same machine (running Win 03 Server). I cannot connect to the SQL Server. Error as below: Connection failed: SQLState: '01000' SQL Server Error: 14 [Microsoft][ODBC SQL Server Driver][Shared Memory] ConnectionOpen(Invalid Instance()). SQLState: '08001' SQL Server Error: 14 [Microsoft][ODBC SQL Server Driver][Shared Memory]Invalid connection. ...

making a primary key in excel
hiya, i would just like to know howq you can format a column so that it automatically inserts an ID when i input a new record. ta ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ your best bet is to have a formula such as =A1+1 in the cell A2, but you would need to drag this formula down. If you don't want users to overtype this, you'd need to lock it down and protect the sheet. Cheers, Katherine "electric_d" <electric_d.vqwbb@excelforum-nospam...

Charts Excel 2003
I have several Dynamic Charts that plot daily data and a Month to date value. I show the data table. I am using line charts, and adding a Trendline. How can I show the Month To Date value without having it affect the daily trendline? You shouldn't include the MTD value as part of the daily value series. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Gringarlow" <Gringarlow@discussions.microsoft.com> wrote in message news:8CD46CAB-4A3F-457A-8C6B-03FF488C0011@microsoft.c...