If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Insert a default record for all values
I have a table with station names for ex. SS-MICU, SS-MIMCU, ect. I need to
have a query fun and input a value of SS-MICU 00000 for all records that have a station name. I hope this makes sense. My example is the data I pull looks like SS-MICU 04544 since that is the lowest number I'm pulling back and I have to have a value of SS-MICU 00000 as the first record and I need a way to put that in all records I have. Thanks in advance. |
#2
|
|||
|
|||
Insert a default record for all values
Anthony
It is rarely necessary or a good idea to insert "dummy" records. If you'll describe in a bit more detail what you hope to accomplish (i.e., what business need are you "solving") by having the dummy/default record inserted, folks here may be able to offer more detailed suggestions. Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Anthony" wrote in message ... I have a table with station names for ex. SS-MICU, SS-MIMCU, ect. I need to have a query fun and input a value of SS-MICU 00000 for all records that have a station name. I hope this makes sense. My example is the data I pull looks like SS-MICU 04544 since that is the lowest number I'm pulling back and I have to have a value of SS-MICU 00000 as the first record and I need a way to put that in all records I have. Thanks in advance. |
#3
|
|||
|
|||
Insert a default record for all values
Well I'm using a program called docfinity running a form and I have to query
information in the background for station, item, and par level information. So docfinity could only pull back this information and place it in a dropdown. There are five dropdown boxes and by default it places the lowest number in the dropdown. But, we need the dropbown box by default to show a record that is a 00000 number so once the user submits the form since nothing in my database the program is looking for the record will stay blank on the form. The docfinity staff says that is the only way they can make it work, so this is why I need it to place one record with 00000 with every change in my device table. IE: I have 93 devices, so I would have to have 93 records that have 00000. I hope this helps explain why, it is really hard to describe if you don't see it. "Jeff Boyce" wrote: Anthony It is rarely necessary or a good idea to insert "dummy" records. If you'll describe in a bit more detail what you hope to accomplish (i.e., what business need are you "solving") by having the dummy/default record inserted, folks here may be able to offer more detailed suggestions. Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Anthony" wrote in message ... I have a table with station names for ex. SS-MICU, SS-MIMCU, ect. I need to have a query fun and input a value of SS-MICU 00000 for all records that have a station name. I hope this makes sense. My example is the data I pull looks like SS-MICU 04544 since that is the lowest number I'm pulling back and I have to have a value of SS-MICU 00000 as the first record and I need a way to put that in all records I have. Thanks in advance. . |
#4
|
|||
|
|||
Insert a default record for all values
Assuming that you have a table the lists the station Names and want to insert
this value into another table one time you could do this with a query. INSERT Into SomeTable(SomeField) SELECT StationNames & "00000" FROM TableOfStationNames LEFT JOIN SomeTable ON StationNames & "00000" =SomeTable.SomeField WHERE SomeTable.SomeField is Null With only 93 station names, I would assume you could simply add up to 93 records manually just as easily. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Anthony wrote: I have a table with station names for ex. SS-MICU, SS-MIMCU, ect. I need to have a query fun and input a value of SS-MICU 00000 for all records that have a station name. I hope this makes sense. My example is the data I pull looks like SS-MICU 04544 since that is the lowest number I'm pulling back and I have to have a value of SS-MICU 00000 as the first record and I need a way to put that in all records I have. Thanks in advance. |
Thread Tools | |
Display Modes | |
|
|