Help needed with referencing single Excel cells and formatting resulting text

In InDesign CS5 I am putting together a 20pp catalogue of about 200 products. The plan is to have the product information, SKU code, quantity etc fixed, but have the prices (there are two i.e. pack price and individual price) being linked to an Excel spreadsheet. This is so that the prices can be updated in the Excel file and the InDesign file will pull the new prices through. In case you are wondering why I don't pull the whole set of information through, this is because there are a lot of copywriting changes done to the information once it's in InDesign - it's only going to be the prices that will be updated.
I am planning on having two single cell tables in their own text frame, duly formatted with cell style, table style and paragraph style for the two price variables. This I am then going to have to repeat 200 times making sure I link to the next row down in Excel. This is going to be a hideous task but I see know way of modifying the cell in InDesign to point it to the next row in Excel. That's my first problem.
My second problem is this. In the Excel sheet, the prices are formatted as UK currency and are therefore like this...
£2.00
£0.40
£1.43
£9.99
£0.99
£0.09
What I will require is once I import that data (and refresh the data via a newly saved Excel file) is that the prices end up like this...
£2.00
40p
£1.43
£9.99
99p
9p
So if the value is lower than £1.00 it needs a trailing 'p' added  and the leading zero and '£' sign stripped off. If the value is lower than £0.10 it also needs the zero after the decimal point stripping off.
Then formatting wise, the '£' sign needs to be superscripted and the same for the 'p'. This I am assuming could be done via GREP?
In summary, can anyone help with the first task of referecing the Excel cells on a cell by cell basis, given that it is the same cell column each time, but the next row down, and also point me in the right direction of the price formattting issues.
Any help will be gratefully received.

I would do this:
Create on line with the formatting.
Export as InDesign tagged text (TXT)
Read out these tags
In Excel exists a function to connect text from several cells and predfined text, there connect the content from cells with the paragraph styling tags. Do it in a seperate sheet. (Better would be to use a database like Access, there you can link your Excel sheet).
Export this sheet as txt file
Place this sheet as tagged text (there is an option in one of the sialog boxes).
In preferences  < file handling you can specify that Tablecalculation Sheets and text is not embedded but linked, turn it on.

Similar Messages

  • Help needed with Sun Java Studio Creator and EJB in a Portlet Project

    Hi
    I have created an web-application with JSF in Sun Java Studio Creator 2. The web application uses a lot of EJB's which acts as the dataProviders. In a typical jsp page i have more that one data providers(the EJB's) getting used. When i run the project everything opens up properly in the browser and the application seems to be fine.
    But when i create a JSP 168 Portlet project and do exactly the same thing for some reason the Apache Pluto(comes as the default Portlet Container with Studio Creator) conks off.
    Then i started going ahead step by step:
    1. First i created a portletpage and added only one dataProvider(EJB) and ran the project...It gets deployed properly in Pluto and the browser comes up and everything shows up fine.
    2. Just to re-confirm i did the same thing with another dataProvider(EJB). So still we have just 1 EJB in the portlet page. As expected it also worked fiine.
    3. Then when I added more that one dataProviders(EJBs) in the porlet page the Apache Pluto conks off(saying that Pluto is not available)
    I tried doing a lot of things but nothing works...Surprisingly the same thing works when u create a JSF web Application project but the same thing does not work when u create a JSR 168 JSF Portlet Project...
    Did anybody face the same problem..Is it a bug in the Studio Creator...Any help would be highly appreciated.

    Hi,
    There are a few discussion threads in the feedbackprograms portal for Creator 2 EA 2. The URL is:
    https://feedbackprograms.sun.com/login.html
    In the EA discussion forum you will find threads which discuss the concerned topic. In specific look for threads titled:
    # Deploying Portlets
    # Taking a JSC Portlet to Tomcat creates a Faces Mapping Error
    # Problem with Pluto when trying to deploy a portlet
    # Request: JSR-168 Portlet Project without JSF
    We kindly request you to post your further queries related to EA in the above mentioned forum.
    Cheers
    Giri

  • Help needed with Windows 8.1 boot and recovery issue

    Hi. I hope someone can help me out with this Windows 8.1 issue. A friends computer (HP 2000-2c27CL Notebook) was badly infected and while I was able to do some cleaning in normal Windows I had to do some in Safe Mode. I was not being able to access Safe Mode so I went to Advanced Startup Options in Windows 8, Troubleshoot, then Advanced options, and finally the Command Prompt. Using the command prompt I typed "bcdedit /set {default} safeboot network" to have Safe Mode with Networking. Ever since I did that I haven't been able to get Windows to do a normal boot. I always get Safe Mode. I can't get back to Advanced Startup Options either. Via msconfig in Safe Mode I selected the Normal startup button on the General tab and selected apply and then ok. It then prompted me to restart the computer which I did. This did not fix the issue as I continue to get Safe Mode every time I start the computer. I also tried to do a complete system restore by typing "Recovery" in Windows 8 which brought up the HP Recovery Manager. Once in there I selected the Windows Recovery Environment and it prompted me to reboot the computer. I was expecting to get to an area where I could do a complete factory restore, but I again got booted into Safe Mode. What the heck is going on? The person who has this computer has no restore media... no USB or DVD discs made. There is however a recovery partition I believe, but as I said I can't do anything because I keep getting Safe Mode. Also I tried to use a antivirus emergency boot disk with this computer and I could not get it to boot from the DVDRom drive. I went into the BIOS and saw that Legacy is disabled and UEFI appears to be enabled by default. How am I to change the boot order to get it to boot from the disk and do scans for malware? I thought I did it correctly by moving the Rom drive to the top of the list, but that didn't work. I despise Windows 8x!!!
    Help with this is greatly appreciated. Thank you.

    Hi HPenn, welcome to the HP Forums. Unfortunately if you are unable to perform a recovery using any of the available methods:  Performing an HP System Recovery (Windows 8)
    You will have to order recovery media:  Order software and driver media
    I hope this helps.
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Help needed with macpro win 7 bootcamp and black screens

    I have the following machine
    2008 Mac Pro
    2.0 ghz version with 10gb Ram
    Ati 3850
    3 - 2gb hard drives and 1 - 1gb drive as boot
    Fresh Windows 7 enterprise install with Bootcamp 3.1
    lately any major games that have come out constantly crash to black screen after a couple minutes.
    So far
    Bioshock 2 , Star Trek Online and others do it no matter what the Resolution is set to.
    Ati is the 10.2 catalyst

    I'm going to assume you have 667MHz FBDIMM and not 800MHz, making it a 2007... there never was a 2GHz other than 2006-7 MP 1,1.
    ATI 3870 ?
    3 x 2GB hard drive... ? 1GB boot? what is that? TB in each case?
    (did you proof before posting? helps a little... ;-(
    Those are latest ATI Catalyst?
    Windows 7 is rock solid on my 2006 Mac Pro, no issues. However there is little to no thermal fan control in Windows, and the 3870 isn't what it could be.

  • Help needed with saving interactive PDF (Video and Youtube in InDesign)

    Designing a brochure in Indesign CS6 I have placed small MP4 video file into indesign, when I save the file as an interactive pdf the video files dont show up in preview on mac, just a blank white space. the window does show in adobe reader but im having problems with the play function not being able to pause that. Would like the file to be a pdf so can share across a few devices and platforms.
    Have also tried a workaround which hyperlinks an screencaption but the link appears broken when i click the image, is this something to do with you tube video being private? 

    Moved to InDesign forum.
    When you export you will note that you export an Adobe PDF. There's a reason for that.
    Mac Preview is fine for a plain vanilla PDF but it ends there.
    Bob

  • Help needed with 4th gen. iPod shuffle and "reshuffling" music

    I have a silver 4th gen. iPod shuffle that works well for me.     I had 196 songs on it and in the last couple of days, I added 14 more.  Now, I have 210 songs on it.  Cool.  The issue I have is NONE of the new songs play. I do get a good mixture of music and it's pretty random but in the 7 or so hours I listened to my iPod today at work, NONE of the new songs I added played at all.  I would guess at least one of the new songs would have played but none did.
    I found the iPod manual online in PDF format and read the instructions for "reshuffling" the iPod, but I'm not sure that worked.   So, here are my questions:
    When I add new music, must I manually "reshuffle" the songs manually or should that happen automatically?
    When I "reshuffle" the songs, I follow these steps:  "To reshuffle songs, slide the three-way switch from shuffle (icon) to play in order (icon) and back to
    shuffle again.  Must the iPod be playing music when I do this or does that matter?
    I manually add the music to the iPod and don't automatically sync anything, nor do I have any playlists.
    Thanks in advance!
    Peace...

    You may want to play the shuffle with the switch in the middle play-in-order position.  Then, when you play songs from the All Songs list, they play in alphabetical order.  That should make it easier to confirm that songs on the new batch does actually play (because the order is not random). 
    Also, there are only about 200 songs on there, so keep hitting Next until hear one of the new songs.  If you get back to the first song without hearing one of the new songs, something is wrong.
    It should not matter when you do the reshuffle step, whether the iPod is playing or not.
    Have you checked using iTunes, to confirm the new batch of songs is on the shuffle?  If the iTunes sidebar is hidden, from the menu bar, under View, select Show Sidebar.  The shuffle appears in the sidebar, under DEVICES.  Click the small triangle to the left of the shuffle's name, to drop down its content list (indented below the shuffle) Click on Music there.  The list of songs on the shuffle is shown to the right.  Are those 14 new songs on the list?

  • Help needed with header and upload onto business catalyst

    Can someone help with a problem over a header please?
    I have inserted a rectangle with a jpeg image in  background, in the 'header' section, underneath the menu. It comes up fine on most pages when previsualised, going right to the side of the screen, but stops just before the edge on certain pages. I have double checked that I have placed it in the right place in relation to the guides on the page.
    That's one problem.
    The second problem is that I tried to upload onto business catalyst, which got to 60% and refused to go any further, saying it couldn't find the header picture, giving the title and then u4833-3.fr.png. The picture is in the right folder I have double checked. And it isn't a png. Does it have to be ?
    And the third problem is that I got an email following my upload from business catalyst in Swedish. I am living in France.
    Can anyone help ? Thanks.

    Thanks for replying,
    How can I check the preview in other browsers before I publish a provisional site with BC?
    The rectangle width issue happens on certain pages but not others. The Welecom page is fine when the menu is active, also the contact page, but others are slightly too narrow. Changing the menu spacing doesn’t help - I was already on uniform but tried changing to regular and back.
    In design mode the rectangle is set to the edge of the browser, that’s 100%browser width right?
    Re BC I have about 200 images on 24 different pages and it seems to be having difficulty uploading some of them. But it has managed a couple I named with spaces but not others I named with just one name.
    Is there an issue on size of pictures ? If I need to replace is there a quick way to rename and relink or do I have to insert the photos all over again?
    I’m a novice with Muse with an ambitious site !
    Thanks for your help.
    Mary Featherstone
    Envoyé depuis Courrier Windows
    De : Sanjit_Das
    Envoyé : vendredi 14 février 2014 22:15
    À : MFeatherstone
    Re: Help needed with header and upload onto business catalyst
    created by Sanjit_Das in Help with using Adobe Muse CC - View the full discussion 
    Hi
    Answering the questions :
    - Have you checked the preview in Muse and also in other browsers ?
    - Does the rectangle width issue happens when menu is active , or in any specific state , Try to change the menu with uniform spacing and then check.
    - In design view the rectangle is set to 100% browser width ?
    With publishing :
    - Please try to rename the image file and then relink
    - If it happens with other images as well , see if all the image names includes strange characters or spaces.
    - Try again to publish
    With e-mail from BC :
    - Under preferences , please check the country selected.
    - If you have previously created partner account in BC and selected country and language then it would follow that, please check that.
    Thanks,
    Sanjit
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6121942#6121942
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6121942#6121942
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6121942#6121942. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Help with using Adobe Muse CC at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • HELP NEEDED WITH ADDAPTER-DVI TO VGA.

    PLEASE ...HELP NEEDED WITH WIRING CROSS OVER....CAN YOU HELP WITH BACK OF PLUG CONNECTIONS...I SORTA UNDERSTAND THE PINOUTS BUT CANT MAKE AN EXACT MACH...WOULD LIKE TO BE 100% SURE...
    ......THIS ENSURES NO SMOKE!!!                                                                                           
    THE CARD IS AN ATI RADEON RX9250-DUAL HEAD-.........ADDAPTER IS DVI(ANALOG)MALE TO VGA(ANALOG)FEMALE.
    ANY HELP VERY MUCH APPRECIATED........ SEEMS YOU NEED TO BE ROCKET SCI TO ATTACH A BLOODY PICTURE...SO THIS HAS BEEN BIG WASTE OF FING TIME!

    Quote from: BOBHIGH on 17-December-05, 09:21:31
    Get over it mate !
    I find it easy t read CAPS...and if you dont like it ...DONT READ IT!
    And why bother to reply...some people have nothing better to do.
    Yes there chep and easy to come by...Ive already got a new one.
    All I wanted was to make a diagram of whats inside the bloody thing...it was a simple question and required a simple answer.
    NO NEED TO A WANKA !!
    I feel a bann comming up.
    Have you tryed Google ? really.. your question is inrelevant. No need to reply indeed.
    Why do you come here asking this question anyway ? is it becouse you have a MSI gfx card ? and the adapter has nothing to do with this ?
    You think you can come in here yelling.. thinking we have to put up with it and accept your style of posting. This is not a MSI tech center.. it's a user to user center.. Your question has nothing to do with MSI relavant things anyway's.
    Google = your friend.
    Quote from: BOBHIGH on 17-December-05, 09:21:31
    it was a simple question and required a simple answer
    Simple for who ? you (buying a new one) ? me ? we ?   .really...........
    Quote from: Dynamike on 16-December-05, 04:11:48
    1: There are allot of diffrent types of those adapters.
    If any of the mods have a problem about my reply.. please pm me.

  • Help needed with Vista 64 Ultimate

    "Help needed with Vista 64 UltimateI I need some help in getting XFI Dolby digital to work
    Okay so i went out and I bought a yamaha 630BL reciever, a digital coaxial s/pdif, and a 3.5mm phono plug to fit perfectly to my XFI Extreme Music
    -The audio plays fine and reports as a PCM stream when I play it normally, but I can't get dolby digital or DTS to enable for some reason eventhough I bought the DDL & DTS Connect Pack for $4.72
    When I click dolby digital li've in DDL it jumps back up to off and has this [The operation was unsuccessful. Please try again or reinstall the application].
    Message Edited by Fuzion64 on 03-06-2009 05:33 AMS/PDIF I/O was enabled under speakers in control panel/sound, but S/PDIF Out function was totally disabled
    once I set this to enabled Dolby and DTS went acti've.
    I also have a question on 5. and Vista 64
    -When I game I normally use headphones in game mode or 2. with my headphones, the reason for this is if I set it on 5. I get sounds coming out of all of the wrong channels.
    Now when I watch movies or listen to music I switch to 5. sound in entertainment mode, but to make this work properly I have to open CMSS-3D. I then change it from xpand to stereo and put the slider at even center for 50%. If I use the default xpand mode the audio is way off coming out of all of the wrong channels.
    How do I make 5. render properly on vista

    We ended up getting iTunes cleanly uninstalled and were able to re-install without issue.  All is now mostly well.
    Peace...

  • Help needed with itunes

    help needed with itunes please tryed to move my itunes libary to my external hard drive itunes move ok and runs fin but i have none of my music or apps or anything all my stuff is in the itunes folder on my external hard drive but there is nothing on ituns how do i get it back help,please

    (Make sure the Music (top left) library is selected before beginning this.)
    If you have bad song links in your library, hilite them and hit the delete button. Then locate the folder(s) where your music is located and drag and drop into the large library window in iTunes ( where your tracks show up). This will force the tunes into iTunes. Before you start, check your preferences in iTunes specifically under the"Advanced" tab, general settings. I prefer that the 1st 2 boxes are unchecked. (Keep iTunes Music folder organized & Copy files to iTunes Music folder when adding to library). They are designed to let iTunes manage your library. I prefer to manage it myself. Suit yourself. If there is a way for iTunes to restore broken links other than locating one song at a time I haven't found it yet. (I wish Apple would fix this, as I have used that feature in other apps.) This is the way I do it and I have approx. 25,000 songs and podcasts and videos at present. Hope this helps.

  • Urgent help needed with un-removable junk mail that froze Mail!!

    Urgent help needed with un-removable junk mail that froze Mail?
    I had 7 junk mails come in this morning, 5 went straight to junk and 2 more I junked.
    When I clicked on the Junk folder to empty it, it froze Mail and I can't click on anything, I had to force quit Mail and re-open it. When it re-opens the Junk folder is selected and it is froze, I can't do anything.
    I repaired permissions, it did nothing.
    I re-booted my computer, on opening Mail the In folder was selected, when I selected Junk, again, it locks up Mail and I can't select them to delete them?
    Anyone know how I can delete these Junk mails from my Junk folder without having to open Mail to do it as it would appear this will be the only solution to the problem.

    Hi Nigel
    If you hold the Shift key when opening the mail app, it will start up without any folders selected & no emails showing. Hopefully this will enable you to start Mail ok.
    Then from the Mail menus - choose Mailbox-Erase Junk Mail . The problem mail should now be in the trash. If there's nothing you want to retain from the Trash, you should now choose Mailbox- Erase Deleted Messages....
    If you need to double-check the Trash for anything you might want to retain, then view the Trash folder first, before using Erase Junk Mail & move anything you wish to keep to another folder.
    The shift key starts Mail in a sort of Safe mode.

  • Problem with retrieving single digit date and month

    Hello Sir,
    I have the following code. Cuurently when I insert date in this format 1984/11/14 and also in this format 1984/11/4 and retrieve the following two dates, I could successfully populate the dates into the corresponding fields in the form. But earlier in the database, there are some records created in the following formats:
    1984/3/1 and 1987/10/4(i.e.,yyyy/mm/dd).In the form when I try to populate them into their corresponding fields I am able to populate only 1984 into the year filed in the first case and in the second case I could populate 1987 and 10 into the year and month fields. I could not populate the values of the records with single digit either in month or day fields.
    By observing the code, could you let me know what needs to be done in order to populate the previously created records with the single digit month and date.
    This is the jsp for creating and editing the records.
    <HTML>
    <HEAD>
         <TITLE> CRM Event Information </TITLE>
    <script language="JavaScript" src="../javascript/misc.js"></script>
    <script language="JavaScript">
    function saveMe(methodHow) {
         var elementNumber = CRMEvent.elements.length
         var field1 = "";
         var field2 = "";
         var field3 = "";
         var field4 = "";
         var field5 = "";
         var field6 = "";
         var field7 = "";
         var field8 = "";
         for(i=0; i < elementNumber; i++){
              submitForm.elements.name = CRMEvent.elements[i].name;
              submitForm.elements[i].value = CRMEvent.elements[i].value;
         for (k = 0; k < oneToMany1.addedItems.options.length; k++){;
              if (addTemp.field1oneToMany1Value[k] == ""){
              addTemp.field1oneToMany1Value[k] = "9999"
              if (addTemp.field2oneToMany1Value[k] == ""){
              addTemp.field2oneToMany1Value[k] = "99"
              if (addTemp.field3oneToMany1Value[k] == ""){
              addTemp.field3oneToMany1Value[k] = "99"
              if (addTemp.field4oneToMany1Value[k] == ""){
              addTemp.field4oneToMany1Value[k] = "9999"
              if (addTemp.field5oneToMany1Value[k] == ""){
              addTemp.field5oneToMany1Value[k] = " "
              if (addTemp.field6oneToMany1Value[k] == ""){
              addTemp.field6oneToMany1Value[k] = " "
              if (addTemp.field7oneToMany1Value[k] == ""){
              addTemp.field7oneToMany1Value[k] = " "
              if (addTemp.field8oneToMany1Value[k] == ""){
              addTemp.field8oneToMany1Value[k] = " "
              if (eval(oneToMany1.addedItems.options.length - 1) == k){
                   field1 = field1 + addTemp.field1oneToMany1Value[k];
                   field2 = field2 + addTemp.field2oneToMany1Value[k];
                   field3 = field3 + addTemp.field3oneToMany1Value[k];
                   field4 = field4 + addTemp.field4oneToMany1Value[k];
                   field5 = field5 + addTemp.field5oneToMany1Value[k];
                   field6 = field6 + addTemp.field6oneToMany1Value[k];
                   field7 = field7 + addTemp.field7oneToMany1Value[k];
                   field8 = field8 + addTemp.field8oneToMany1Value[k];
              }else{
                   field1 = field1 + addTemp.field1oneToMany1Value[k]+"|";
                   field2 = field2 + addTemp.field2oneToMany1Value[k]+"|";
                   field3 = field3 + addTemp.field3oneToMany1Value[k]+"|";
                   field4 = field4 + addTemp.field4oneToMany1Value[k]+"|";
                   field5 = field5 + addTemp.field5oneToMany1Value[k]+"|";
                   field6 = field6 + addTemp.field6oneToMany1Value[k]+"|";
                   field7 = field7 + addTemp.field7oneToMany1Value[k]+"|";
                   field8 = field8 + addTemp.field8oneToMany1Value[k]+"|";
              submitForm.elements[eval(i)].name      = "eventtype"
              submitForm.elements[eval(i)].value      = field1
              submitForm.elements[eval(i+1)].name      = "dd_crmstart"
              submitForm.elements[eval(i+1)].value      = field2
              submitForm.elements[eval(i+2)].name      = "mm_crmstart"
              submitForm.elements[eval(i+2)].value      = field3
              submitForm.elements[eval(i+3)].name      = "yy_crmstart"
              submitForm.elements[eval(i+3)].value      = field4
              submitForm.elements[eval(i+4)].name      = "crmremark_code"
              submitForm.elements[eval(i+4)].value      = field5
              submitForm.elements[eval(i+5)].name      = "crmperson_firstname"
              submitForm.elements[eval(i+5)].value      = field6
              submitForm.elements[eval(i+6)].name      = "crmperson_lastname"
              submitForm.elements[eval(i+6)].value      = field7
              submitForm.elements[eval(i+7)].name      = "crmnote"
              submitForm.elements[eval(i+7)].value      = field8
              submitForm.elements[eval(i+8)].name      = "mode"
              submitForm.elements[eval(i+8)].value      = methodHow
         submitForm.method="post";
         onSave(submitForm);
         function onSave(form) {
         if (!oneToMany1.addedItems.options.length == 0) {
              for (i=1;i<=oneToMany1.addedItems.options.length;i++) {
                   validate.elements[0].value = addTemp.field4oneToMany1Value[i-1];
                   if (validate.elements[0].value != '9999') {
                        if(!validateForm('validate','validation','isNumber')) {
                             alert("CRM Event Information "+ i + ": Year must be number");
                             return false;      
                        if(!validateForm('validate','validation','checkrange')) {
                             alert("CRM Event Information "+ i + ": Year out of range");
                             return false;      
              form.submit();
              return true;
    </script>
    </HEAD>
    <BODY BGCOLOR=#ffffff>
    <BASEFONT="3">
    <FONT SIZE = -1>
    <%@ page errorPage="errorPage.jsp" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="dss.*" %>
    <!-- instantiate -->
    <jsp:useBean id="pool" scope="session" class="dss.ConnectionPool" />
    <jsp:useBean id="SelectBox" scope="session" class="dss.dataMisc" />
    <jsp:useBean id="query" class="dss.QueryData" scope="session" />
    <%
    // *************check for user session *************
         session = request.getSession();
    if (session.getValue("userSession") == null) {
    response.sendRedirect (response.encodeRedirectUrl
    ("dssLogin.jsp?Origin=dssACCRMEventAddEdit.jsp"));
    else {
         String dhr_id = "";
    String mode = "";
    String eventtype = "9999";
    String crmremark_code = "";
    String crmperson = "";
    String crmnote = "";
    String crmKey = "";
         String dd_crmstart = "99";
         String mm_crmstart = "99";
    Vector tempVector = new Vector();
              Vector CRMEventVector = new Vector();
              Vector CRMEventPerson = new Vector();
              Vector monthVector = new Vector();
              Vector dayVector = new Vector();
              Vector field1Vector = new Vector();
              Vector field5Vector = new Vector();
              Vector field6Vector = new Vector();
              Vector field7Vector = new Vector();
              Vector field8Vector = new Vector();
              Vector field234Vector = new Vector();
              Vector tempDayVector = new Vector();
              Vector tempMonthVector = new Vector();
              Vector tempYearVector = new Vector();
              Connection conn = null ;
              conn = pool.getConnection() ;
              dss.Database db = new dss.Database( conn ) ;
              dhr_id = request.getParameter("dhr_id");
         try {
    mode = request.getParameter("mode");
    dhr_id = request.getParameter("dhr_id");
                   //look up Setting List
                   String strSQL = "";
                   //look up CRM Event Type List
                   strSQL ="select crmtype_code value, item display from code_crmtype order by 2" ;
                   db.setSQL( strSQL ) ;
                   db.query() ;
                   CRMEventVector = db.getSelectionList() ;
                   //look up Month List
                   db.setSQL( "select LPAD(to_char(month_code),2,'0') value , item display from code_month order by 1" ) ;
                   db.query() ;
                   monthVector = db.getSelectionList();
                   //look up Day List
                   db.setSQL( "select LPAD(to_char(day_code),2,'0') value , item display from code_day order by 1" ) ;
                   db.query() ;
                   dayVector = db.getSelectionList();
                   // ************ EDIT Mode *************
    if (mode.equals("edit"))
              //out.println("mode is edit");     
    mode = "edit";
         //***********get archaeology_pkey based on dhr_id
                        int archKey = 0;
                             strSQL = " SELECT archaeology_pkey "+
                                            " FROM archaeology "+
                                            " WHERE UPPER(dhr_id)='"+ dhr_id.toUpperCase() + "'";
                             //out.println(strSQL);
                             Statement stmt2 = conn.createStatement();
                             ResultSet rs2 = stmt2.executeQuery(strSQL);
                             while (rs2.next()) {
                                  archKey = rs2.getInt(1);
                             rs2.close();
                             stmt2.close();
                   // ********* end getting **************
              strSQL = "Select crmtype_code, crmstart, crmremark, crmperson_firstname, crmperson_lastname, crmnote "+
                   " From archaeologycrmevent " +
                   " Where archaeology_pkey =" + archKey ;
              Statement stmtSQL = conn.createStatement();
              ResultSet rset = stmtSQL.executeQuery(strSQL);
              ResultSetMetaData rsmd = rset.getMetaData() ;
                   while (rset.next()) {
                   //get values
                   field1Vector.addElement(rset.getString(1));
                   field234Vector.addElement(rset.getString(2));
                   field5Vector.addElement(rset.getString(3));
                   field6Vector.addElement(rset.getString(4));
                   field7Vector.addElement(rset.getString(5));
                   field8Vector.addElement(rset.getString(6));
                   //crmKey = rset.getString(7);
                   for (int i=0; i<field234Vector.size(); i++){
                        StringTokenizer tempDate = new StringTokenizer((String)field234Vector.elementAt(i),"/");                              
                        while (tempDate.hasMoreTokens() ) {
                             tempYearVector.addElement (     tempDate.nextToken());
                             tempMonthVector.addElement(     tempDate.nextToken());
                             tempDayVector.addElement (     tempDate.nextToken());
         } //end edit
         } //end try
         catch ( Exception e) {
              out.println ( e.toString() ) ;
         } finally {
              db.cleanup() ;
    %>
    <P>
    <FORM NAME="oneToMany1">
    <TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" BGCOLOR="#BBBBBB">
    <TR>
    <TD BGCOLOR="#002B82" COLSPAN=9 width="100%" height="31">
    <p align="center">
         <font face="Arial" size="2" color="#FFFFFF">
         <b>6. CRM Event Information - </b>DHR ID# : <%=dhr_id %>
         </font>
         </p>
         </td>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>CRM Event Type: </FONT></B></TD>
    <TD WIDTH=112 height="21">
              <%
              out.println ( SelectBox.strSelectionList((Vector)CRMEventVector.elementAt(0), (Vector)CRMEventVector.elementAt(1), "field1", "", eventtype, "180" ));
              %>
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>Event Date: </FONT></B></TD>
    <TD WIDTH=455 height="21"><font size="1">
         <%
         out.println ("<b><font size = 1>Date: "+ SelectBox.strSelectionList((Vector)dayVector.elementAt(0), (Vector)dayVector.elementAt(1), "field2", "", dd_crmstart, "180" ));
         out.println ("Month: "+ SelectBox.strSelectionList((Vector)monthVector.elementAt(0), (Vector)monthVector.elementAt(1), "field3", "", mm_crmstart, "180" ));
         %>
    </select><B>Year:</B><input type="text" name="field4" size="4" id="Year" maxlength="4">
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>ID# Associated with Event:</B> </FONT></TD>
    <TD WIDTH=112 height="30">
              <input type="text" name="field5" size="15" value="<%=crmremark_code%>">
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>
              CRM Person/ Organization: </FONT></B></TD>
    <TD WIDTH=455 height="30">
         <% // Modified by Robert Cox 09/12/2001 - changed field size from 20 to 30 // %>     
         <TABLE BORDER="0">
              <TR><TD>
              <FONT SIZE="1"><B>First:</B></FONT><input type="text" name="field6" size="15">
              </TD>
              <TD>
         <FONT SIZE="1"><B>Last:</B></FONT><input type="text" name="field7" size="15">
              </TD>
              </TR>
         </TABLE>
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="79"><FONT SIZE=-1><B>CRM Event Comments: </FONT></B></TD>
    <TD COLSPAN="3" width="660" height="79">
         <TEXTAREA ROWS="5" NAME="field8" cols="65"></TEXTAREA>
         </TD>
    </TR>
    <TR>
    <TD COLSPAN="4">
         <table border="0" cellspacing="0" cellpadding="0" align="center">
         <tr>
         <td width="50" align="left"> </td>
         <td align="center">
              <input type="button" value="Add" onClick="addUpdate(1,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Modify" onClick="addUpdate(2,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Update" onClick="addUpdate(3,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Remove" onClick="addUpdate(4,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
         </td>
         <td width="50" align="right"> </td>
         </tr>
         </table>
    </TD>
    </TR>
    <tr>
    <td width="100%" align="center" height="40" colspan="4"><select size="3" name="addedItems" style="width:100%">
    </td>
    </tr>
    </TABLE>
    <%/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //|------------------------------------------------------------------------------------------------------------------------
    //| Start code for one-to-many in edit mode /
    //|---------------------------------------------
    %>
    <script language="javascript">
    /* Check to see if the necessary arrays have been defined - if not define them */
         try{
              if (!eval("addTemp.addoneToMany1Name")){
              //alert("False");
              addTemp.addoneToMany1Name = Array();
              addTemp.addoneToMany1Value = Array();
              for(i = 1; i <= 8; i++){
                   eval("addTemp.field" + i + "oneToMany1Value = Array();");
              }else{
              //alert("already created");
    /* Catch any errors that may occur when checking if arrays are defined */
         catch(e) {
              alert(e);
    <%
    Enumeration field1_      = field1Vector.elements();
    Enumeration field2_      = tempDayVector.elements();
    Enumeration field3_      = tempMonthVector.elements();
    Enumeration field4_      = tempYearVector.elements();
    Enumeration field5_      = field5Vector.elements();
    Enumeration field6_      = field6Vector.elements();
    Enumeration field7_      = field7Vector.elements();
    Enumeration field8_      = field8Vector.elements();
         Object currentfield1 = "";
         Object currentfield2 = "";
         Object currentfield3 = "";
         Object currentfield4 = "";
         Object currentfield5 = "";
         Object currentfield6 = "";
         Object currentfield7 = "";
         Object currentfield8 = "";
         int counter = 0;
         int clength = 1;
    while (field1_.hasMoreElements()){
    //out.println("while field1_ has more elements");
    //|---------------------------------------------------------------------------------------------------------------------------
    //| define field elements - Use first and second lines if text box or memo field, Use third line if select box /
    //|------------------------------------------------------------------------------------------------------------
    //     currentfield1 = query.replaceString(field1_.nextElement().toString(),"'","\'").trim();
    //     currentfield1 = query.replaceString(currentfield1.toString(),"\"","\\" + "\"");
         currentfield1 = field1_.nextElement();
    //     currentfield2 = query.replaceString(field2_.nextElement().toString(),"'","\'").trim();
    //     currentfield2 = query.replaceString(currentfield2.toString(),"\"","\\" + "\"");
         currentfield2 = field2_.nextElement();
    //     currentfield3 = query.replaceString(field3_.nextElement().toString(),"'","\'").trim();
    //     currentfield3 = query.replaceString(currentfield3.toString(),"\"","\\" + "\"");
         currentfield3 = field3_.nextElement();
         currentfield4 = query.replaceString(field4_.nextElement().toString(),"'","\'").trim();
         currentfield4 = query.replaceString(currentfield4.toString(),"\"","\\" + "\"");
    //     currentfield4 = field4_.nextElement();
         currentfield5 = query.replaceString(field5_.nextElement().toString(),"'","\'").trim();
         currentfield5 = query.replaceString(currentfield5.toString(),"\"","\\" + "\"");
    //     currentfield5 = tempElement;
         currentfield6 = query.replaceString(field6_.nextElement().toString(),"'","\'").trim();
         currentfield6 = query.replaceString(currentfield6.toString(),"\"","\\" + "\"");
    //     currentfield6 = field6_.nextElement();
         currentfield7 = query.replaceString(field7_.nextElement().toString(),"'","\'").trim();
         currentfield7 = query.replaceString(currentfield7.toString(),"\"","\\" + "\"");
    //     currentfield7 = field7_.nextElement();
         currentfield8 = query.replaceString(field8_.nextElement().toString(),"'","\'").trim();
         currentfield8 = query.replaceString(query.replaceString(query.replaceString(currentfield8.toString(),"\"","\\" + "\""),"\r","\\" + "r"),"\n","\\" + "n");
    //     currentfield8 = field8_.nextElement();
         out.println("oneToMany1.addedItems.options.length ="+clength+";");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("oneToMany1.addedItems.options[" + counter + "].text = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("oneToMany1.addedItems.options[" + counter + "].value = '" + counter + "';");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("addTemp.addoneToMany1Name[" + counter + "] = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("addTemp.addoneToMany1Value[" + counter + "] = \"" + counter + " \";");
    //           Use first line for text boxes and memo fields, Use second line for Select Boxes /
    //     out.println("addTemp.field1oneToMany1Value[" + counter + "] = \"" +      currentfield1 + "\";");
         out.println("addTemp.field1oneToMany1Value[" + counter + "] = '" +      currentfield1 + "';");
    //     out.println("addTemp.field2oneToMany1Value[" + counter + "] = \"" +      currentfield2 + "\";");
         out.println("addTemp.field2oneToMany1Value[" + counter + "] = '" +      currentfield2 + "';");
    //     out.println("addTemp.field3oneToMany1Value[" + counter + "] = \"" +      currentfield3 + " \";");
         out.println("addTemp.field3oneToMany1Value[" + counter + "] = '" +      currentfield3 + "';");
         out.println("addTemp.field4oneToMany1Value[" + counter + "] = \"" +      currentfield4 + "\";");
    //     out.println("addTemp.field4oneToMany1Value[" + counter + "] = '" +      currentfield4 + "';");
         out.println("addTemp.field5oneToMany1Value[" + counter + "] = \"" +      currentfield5 + "\";");
    //     out.println("addTemp.field5oneToMany1Value[" + counter + "] = '" +      currentfield5 + "';");
         out.println("addTemp.field6oneToMany1Value[" + counter + "] = \"" +      currentfield6 + "\";");
    //     out.println("addTemp.field6oneToMany1Value[" + counter + "] = '" +      currentfield6 + "';");
         out.println("addTemp.field7oneToMany1Value[" + counter + "] = \"" +      currentfield7 + "\";");
    //     out.println("addTemp.field7oneToMany1Value[" + counter + "] = '" +      currentfield7 + "';");
         out.println("addTemp.field8oneToMany1Value[" + counter + "] = \"" +      currentfield8 + "\";");
    //     out.println("addTemp.field8oneToMany1Value[" + counter + "] = '" +      currentfield8 + "';");
         clength = clength + 1;
         counter = counter + 1;
    %>
    </script>
    </FORM>
    </FONT>
    <BR>
    <FORM NAME="CRMEvent">
    <input type="hidden" name=dhr_id value=<%=dhr_id %>>
    <!-- <input type="hidden" name=crmKey value=<%//=crmKey %>> -->
    <input type="hidden" name=mode value=<%=mode%>>
    <table border="0" width="100%" cellspacing="1">
    <tr>
         <%
              if (mode.equals("add")) {
              %>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
    <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('add')"></td>
         <% } else if (mode.equals("edit")){
         %>
    <td width="103"><input type="button" value="<< Previous" name="Previous" onclick="history.go(-1)"></td>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
         <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('edit')"></td>
         <%
         %>
    </tr>
    </table>
    <%
    }; //end else for checking session
    %>
    </FORM>
    <HR>
    Click the next button to move to the next screen without saving the current screen.<br>
    Click the save button to save the current screen and then move to the next screen.<br>
    <p>
    <form name="submitForm" action="dssACCRMEventDB.jsp" action="post">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    </form>
    <form name="validate">
    <input type="hidden" name="validation">
    </form>
    </BODY>
    </HTML>

    Hello Sir,
    I have the following code. Cuurently when I insert date in this format 1984/11/14 and also in this format 1984/11/4 and retrieve the following two dates, I could successfully populate the dates into the corresponding fields in the form. But earlier in the database, there are some records created in the following formats:
    1984/3/1 and 1987/10/4(i.e.,yyyy/mm/dd).In the form when I try to populate them into their corresponding fields I am able to populate only 1984 into the year filed in the first case and in the second case I could populate 1987 and 10 into the year and month fields. I could not populate the values of the records with single digit either in month or day fields.
    By observing the code, could you let me know what needs to be done in order to populate the previously created records with the single digit month and date.
    This is the jsp for creating and editing the records.
    <HTML>
    <HEAD>
         <TITLE> CRM Event Information </TITLE>
    <script language="JavaScript" src="../javascript/misc.js"></script>
    <script language="JavaScript">
    function saveMe(methodHow) {
         var elementNumber = CRMEvent.elements.length
         var field1 = "";
         var field2 = "";
         var field3 = "";
         var field4 = "";
         var field5 = "";
         var field6 = "";
         var field7 = "";
         var field8 = "";
         for(i=0; i < elementNumber; i++){
              submitForm.elements.name = CRMEvent.elements[i].name;
              submitForm.elements[i].value = CRMEvent.elements[i].value;
         for (k = 0; k < oneToMany1.addedItems.options.length; k++){;
              if (addTemp.field1oneToMany1Value[k] == ""){
              addTemp.field1oneToMany1Value[k] = "9999"
              if (addTemp.field2oneToMany1Value[k] == ""){
              addTemp.field2oneToMany1Value[k] = "99"
              if (addTemp.field3oneToMany1Value[k] == ""){
              addTemp.field3oneToMany1Value[k] = "99"
              if (addTemp.field4oneToMany1Value[k] == ""){
              addTemp.field4oneToMany1Value[k] = "9999"
              if (addTemp.field5oneToMany1Value[k] == ""){
              addTemp.field5oneToMany1Value[k] = " "
              if (addTemp.field6oneToMany1Value[k] == ""){
              addTemp.field6oneToMany1Value[k] = " "
              if (addTemp.field7oneToMany1Value[k] == ""){
              addTemp.field7oneToMany1Value[k] = " "
              if (addTemp.field8oneToMany1Value[k] == ""){
              addTemp.field8oneToMany1Value[k] = " "
              if (eval(oneToMany1.addedItems.options.length - 1) == k){
                   field1 = field1 + addTemp.field1oneToMany1Value[k];
                   field2 = field2 + addTemp.field2oneToMany1Value[k];
                   field3 = field3 + addTemp.field3oneToMany1Value[k];
                   field4 = field4 + addTemp.field4oneToMany1Value[k];
                   field5 = field5 + addTemp.field5oneToMany1Value[k];
                   field6 = field6 + addTemp.field6oneToMany1Value[k];
                   field7 = field7 + addTemp.field7oneToMany1Value[k];
                   field8 = field8 + addTemp.field8oneToMany1Value[k];
              }else{
                   field1 = field1 + addTemp.field1oneToMany1Value[k]+"|";
                   field2 = field2 + addTemp.field2oneToMany1Value[k]+"|";
                   field3 = field3 + addTemp.field3oneToMany1Value[k]+"|";
                   field4 = field4 + addTemp.field4oneToMany1Value[k]+"|";
                   field5 = field5 + addTemp.field5oneToMany1Value[k]+"|";
                   field6 = field6 + addTemp.field6oneToMany1Value[k]+"|";
                   field7 = field7 + addTemp.field7oneToMany1Value[k]+"|";
                   field8 = field8 + addTemp.field8oneToMany1Value[k]+"|";
              submitForm.elements[eval(i)].name      = "eventtype"
              submitForm.elements[eval(i)].value      = field1
              submitForm.elements[eval(i+1)].name      = "dd_crmstart"
              submitForm.elements[eval(i+1)].value      = field2
              submitForm.elements[eval(i+2)].name      = "mm_crmstart"
              submitForm.elements[eval(i+2)].value      = field3
              submitForm.elements[eval(i+3)].name      = "yy_crmstart"
              submitForm.elements[eval(i+3)].value      = field4
              submitForm.elements[eval(i+4)].name      = "crmremark_code"
              submitForm.elements[eval(i+4)].value      = field5
              submitForm.elements[eval(i+5)].name      = "crmperson_firstname"
              submitForm.elements[eval(i+5)].value      = field6
              submitForm.elements[eval(i+6)].name      = "crmperson_lastname"
              submitForm.elements[eval(i+6)].value      = field7
              submitForm.elements[eval(i+7)].name      = "crmnote"
              submitForm.elements[eval(i+7)].value      = field8
              submitForm.elements[eval(i+8)].name      = "mode"
              submitForm.elements[eval(i+8)].value      = methodHow
         submitForm.method="post";
         onSave(submitForm);
         function onSave(form) {
         if (!oneToMany1.addedItems.options.length == 0) {
              for (i=1;i<=oneToMany1.addedItems.options.length;i++) {
                   validate.elements[0].value = addTemp.field4oneToMany1Value[i-1];
                   if (validate.elements[0].value != '9999') {
                        if(!validateForm('validate','validation','isNumber')) {
                             alert("CRM Event Information "+ i + ": Year must be number");
                             return false;      
                        if(!validateForm('validate','validation','checkrange')) {
                             alert("CRM Event Information "+ i + ": Year out of range");
                             return false;      
              form.submit();
              return true;
    </script>
    </HEAD>
    <BODY BGCOLOR=#ffffff>
    <BASEFONT="3">
    <FONT SIZE = -1>
    <%@ page errorPage="errorPage.jsp" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="dss.*" %>
    <!-- instantiate -->
    <jsp:useBean id="pool" scope="session" class="dss.ConnectionPool" />
    <jsp:useBean id="SelectBox" scope="session" class="dss.dataMisc" />
    <jsp:useBean id="query" class="dss.QueryData" scope="session" />
    <%
    // *************check for user session *************
         session = request.getSession();
    if (session.getValue("userSession") == null) {
    response.sendRedirect (response.encodeRedirectUrl
    ("dssLogin.jsp?Origin=dssACCRMEventAddEdit.jsp"));
    else {
         String dhr_id = "";
    String mode = "";
    String eventtype = "9999";
    String crmremark_code = "";
    String crmperson = "";
    String crmnote = "";
    String crmKey = "";
         String dd_crmstart = "99";
         String mm_crmstart = "99";
    Vector tempVector = new Vector();
              Vector CRMEventVector = new Vector();
              Vector CRMEventPerson = new Vector();
              Vector monthVector = new Vector();
              Vector dayVector = new Vector();
              Vector field1Vector = new Vector();
              Vector field5Vector = new Vector();
              Vector field6Vector = new Vector();
              Vector field7Vector = new Vector();
              Vector field8Vector = new Vector();
              Vector field234Vector = new Vector();
              Vector tempDayVector = new Vector();
              Vector tempMonthVector = new Vector();
              Vector tempYearVector = new Vector();
              Connection conn = null ;
              conn = pool.getConnection() ;
              dss.Database db = new dss.Database( conn ) ;
              dhr_id = request.getParameter("dhr_id");
         try {
    mode = request.getParameter("mode");
    dhr_id = request.getParameter("dhr_id");
                   //look up Setting List
                   String strSQL = "";
                   //look up CRM Event Type List
                   strSQL ="select crmtype_code value, item display from code_crmtype order by 2" ;
                   db.setSQL( strSQL ) ;
                   db.query() ;
                   CRMEventVector = db.getSelectionList() ;
                   //look up Month List
                   db.setSQL( "select LPAD(to_char(month_code),2,'0') value , item display from code_month order by 1" ) ;
                   db.query() ;
                   monthVector = db.getSelectionList();
                   //look up Day List
                   db.setSQL( "select LPAD(to_char(day_code),2,'0') value , item display from code_day order by 1" ) ;
                   db.query() ;
                   dayVector = db.getSelectionList();
                   // ************ EDIT Mode *************
    if (mode.equals("edit"))
              //out.println("mode is edit");     
    mode = "edit";
         //***********get archaeology_pkey based on dhr_id
                        int archKey = 0;
                             strSQL = " SELECT archaeology_pkey "+
                                            " FROM archaeology "+
                                            " WHERE UPPER(dhr_id)='"+ dhr_id.toUpperCase() + "'";
                             //out.println(strSQL);
                             Statement stmt2 = conn.createStatement();
                             ResultSet rs2 = stmt2.executeQuery(strSQL);
                             while (rs2.next()) {
                                  archKey = rs2.getInt(1);
                             rs2.close();
                             stmt2.close();
                   // ********* end getting **************
              strSQL = "Select crmtype_code, crmstart, crmremark, crmperson_firstname, crmperson_lastname, crmnote "+
                   " From archaeologycrmevent " +
                   " Where archaeology_pkey =" + archKey ;
              Statement stmtSQL = conn.createStatement();
              ResultSet rset = stmtSQL.executeQuery(strSQL);
              ResultSetMetaData rsmd = rset.getMetaData() ;
                   while (rset.next()) {
                   //get values
                   field1Vector.addElement(rset.getString(1));
                   field234Vector.addElement(rset.getString(2));
                   field5Vector.addElement(rset.getString(3));
                   field6Vector.addElement(rset.getString(4));
                   field7Vector.addElement(rset.getString(5));
                   field8Vector.addElement(rset.getString(6));
                   //crmKey = rset.getString(7);
                   for (int i=0; i<field234Vector.size(); i++){
                        StringTokenizer tempDate = new StringTokenizer((String)field234Vector.elementAt(i),"/");                              
                        while (tempDate.hasMoreTokens() ) {
                             tempYearVector.addElement (     tempDate.nextToken());
                             tempMonthVector.addElement(     tempDate.nextToken());
                             tempDayVector.addElement (     tempDate.nextToken());
         } //end edit
         } //end try
         catch ( Exception e) {
              out.println ( e.toString() ) ;
         } finally {
              db.cleanup() ;
    %>
    <P>
    <FORM NAME="oneToMany1">
    <TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" BGCOLOR="#BBBBBB">
    <TR>
    <TD BGCOLOR="#002B82" COLSPAN=9 width="100%" height="31">
    <p align="center">
         <font face="Arial" size="2" color="#FFFFFF">
         <b>6. CRM Event Information - </b>DHR ID# : <%=dhr_id %>
         </font>
         </p>
         </td>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>CRM Event Type: </FONT></B></TD>
    <TD WIDTH=112 height="21">
              <%
              out.println ( SelectBox.strSelectionList((Vector)CRMEventVector.elementAt(0), (Vector)CRMEventVector.elementAt(1), "field1", "", eventtype, "180" ));
              %>
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>Event Date: </FONT></B></TD>
    <TD WIDTH=455 height="21"><font size="1">
         <%
         out.println ("<b><font size = 1>Date: "+ SelectBox.strSelectionList((Vector)dayVector.elementAt(0), (Vector)dayVector.elementAt(1), "field2", "", dd_crmstart, "180" ));
         out.println ("Month: "+ SelectBox.strSelectionList((Vector)monthVector.elementAt(0), (Vector)monthVector.elementAt(1), "field3", "", mm_crmstart, "180" ));
         %>
    </select><B>Year:</B><input type="text" name="field4" size="4" id="Year" maxlength="4">
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>ID# Associated with Event:</B> </FONT></TD>
    <TD WIDTH=112 height="30">
              <input type="text" name="field5" size="15" value="<%=crmremark_code%>">
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>
              CRM Person/ Organization: </FONT></B></TD>
    <TD WIDTH=455 height="30">
         <% // Modified by Robert Cox 09/12/2001 - changed field size from 20 to 30 // %>     
         <TABLE BORDER="0">
              <TR><TD>
              <FONT SIZE="1"><B>First:</B></FONT><input type="text" name="field6" size="15">
              </TD>
              <TD>
         <FONT SIZE="1"><B>Last:</B></FONT><input type="text" name="field7" size="15">
              </TD>
              </TR>
         </TABLE>
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="79"><FONT SIZE=-1><B>CRM Event Comments: </FONT></B></TD>
    <TD COLSPAN="3" width="660" height="79">
         <TEXTAREA ROWS="5" NAME="field8" cols="65"></TEXTAREA>
         </TD>
    </TR>
    <TR>
    <TD COLSPAN="4">
         <table border="0" cellspacing="0" cellpadding="0" align="center">
         <tr>
         <td width="50" align="left"> </td>
         <td align="center">
              <input type="button" value="Add" onClick="addUpdate(1,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Modify" onClick="addUpdate(2,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Update" onClick="addUpdate(3,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Remove" onClick="addUpdate(4,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
         </td>
         <td width="50" align="right"> </td>
         </tr>
         </table>
    </TD>
    </TR>
    <tr>
    <td width="100%" align="center" height="40" colspan="4"><select size="3" name="addedItems" style="width:100%">
    </td>
    </tr>
    </TABLE>
    <%/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //|------------------------------------------------------------------------------------------------------------------------
    //| Start code for one-to-many in edit mode /
    //|---------------------------------------------
    %>
    <script language="javascript">
    /* Check to see if the necessary arrays have been defined - if not define them */
         try{
              if (!eval("addTemp.addoneToMany1Name")){
              //alert("False");
              addTemp.addoneToMany1Name = Array();
              addTemp.addoneToMany1Value = Array();
              for(i = 1; i <= 8; i++){
                   eval("addTemp.field" + i + "oneToMany1Value = Array();");
              }else{
              //alert("already created");
    /* Catch any errors that may occur when checking if arrays are defined */
         catch(e) {
              alert(e);
    <%
    Enumeration field1_      = field1Vector.elements();
    Enumeration field2_      = tempDayVector.elements();
    Enumeration field3_      = tempMonthVector.elements();
    Enumeration field4_      = tempYearVector.elements();
    Enumeration field5_      = field5Vector.elements();
    Enumeration field6_      = field6Vector.elements();
    Enumeration field7_      = field7Vector.elements();
    Enumeration field8_      = field8Vector.elements();
         Object currentfield1 = "";
         Object currentfield2 = "";
         Object currentfield3 = "";
         Object currentfield4 = "";
         Object currentfield5 = "";
         Object currentfield6 = "";
         Object currentfield7 = "";
         Object currentfield8 = "";
         int counter = 0;
         int clength = 1;
    while (field1_.hasMoreElements()){
    //out.println("while field1_ has more elements");
    //|---------------------------------------------------------------------------------------------------------------------------
    //| define field elements - Use first and second lines if text box or memo field, Use third line if select box /
    //|------------------------------------------------------------------------------------------------------------
    //     currentfield1 = query.replaceString(field1_.nextElement().toString(),"'","\'").trim();
    //     currentfield1 = query.replaceString(currentfield1.toString(),"\"","\\" + "\"");
         currentfield1 = field1_.nextElement();
    //     currentfield2 = query.replaceString(field2_.nextElement().toString(),"'","\'").trim();
    //     currentfield2 = query.replaceString(currentfield2.toString(),"\"","\\" + "\"");
         currentfield2 = field2_.nextElement();
    //     currentfield3 = query.replaceString(field3_.nextElement().toString(),"'","\'").trim();
    //     currentfield3 = query.replaceString(currentfield3.toString(),"\"","\\" + "\"");
         currentfield3 = field3_.nextElement();
         currentfield4 = query.replaceString(field4_.nextElement().toString(),"'","\'").trim();
         currentfield4 = query.replaceString(currentfield4.toString(),"\"","\\" + "\"");
    //     currentfield4 = field4_.nextElement();
         currentfield5 = query.replaceString(field5_.nextElement().toString(),"'","\'").trim();
         currentfield5 = query.replaceString(currentfield5.toString(),"\"","\\" + "\"");
    //     currentfield5 = tempElement;
         currentfield6 = query.replaceString(field6_.nextElement().toString(),"'","\'").trim();
         currentfield6 = query.replaceString(currentfield6.toString(),"\"","\\" + "\"");
    //     currentfield6 = field6_.nextElement();
         currentfield7 = query.replaceString(field7_.nextElement().toString(),"'","\'").trim();
         currentfield7 = query.replaceString(currentfield7.toString(),"\"","\\" + "\"");
    //     currentfield7 = field7_.nextElement();
         currentfield8 = query.replaceString(field8_.nextElement().toString(),"'","\'").trim();
         currentfield8 = query.replaceString(query.replaceString(query.replaceString(currentfield8.toString(),"\"","\\" + "\""),"\r","\\" + "r"),"\n","\\" + "n");
    //     currentfield8 = field8_.nextElement();
         out.println("oneToMany1.addedItems.options.length ="+clength+";");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("oneToMany1.addedItems.options[" + counter + "].text = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("oneToMany1.addedItems.options[" + counter + "].value = '" + counter + "';");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("addTemp.addoneToMany1Name[" + counter + "] = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("addTemp.addoneToMany1Value[" + counter + "] = \"" + counter + " \";");
    //           Use first line for text boxes and memo fields, Use second line for Select Boxes /
    //     out.println("addTemp.field1oneToMany1Value[" + counter + "] = \"" +      currentfield1 + "\";");
         out.println("addTemp.field1oneToMany1Value[" + counter + "] = '" +      currentfield1 + "';");
    //     out.println("addTemp.field2oneToMany1Value[" + counter + "] = \"" +      currentfield2 + "\";");
         out.println("addTemp.field2oneToMany1Value[" + counter + "] = '" +      currentfield2 + "';");
    //     out.println("addTemp.field3oneToMany1Value[" + counter + "] = \"" +      currentfield3 + " \";");
         out.println("addTemp.field3oneToMany1Value[" + counter + "] = '" +      currentfield3 + "';");
         out.println("addTemp.field4oneToMany1Value[" + counter + "] = \"" +      currentfield4 + "\";");
    //     out.println("addTemp.field4oneToMany1Value[" + counter + "] = '" +      currentfield4 + "';");
         out.println("addTemp.field5oneToMany1Value[" + counter + "] = \"" +      currentfield5 + "\";");
    //     out.println("addTemp.field5oneToMany1Value[" + counter + "] = '" +      currentfield5 + "';");
         out.println("addTemp.field6oneToMany1Value[" + counter + "] = \"" +      currentfield6 + "\";");
    //     out.println("addTemp.field6oneToMany1Value[" + counter + "] = '" +      currentfield6 + "';");
         out.println("addTemp.field7oneToMany1Value[" + counter + "] = \"" +      currentfield7 + "\";");
    //     out.println("addTemp.field7oneToMany1Value[" + counter + "] = '" +      currentfield7 + "';");
         out.println("addTemp.field8oneToMany1Value[" + counter + "] = \"" +      currentfield8 + "\";");
    //     out.println("addTemp.field8oneToMany1Value[" + counter + "] = '" +      currentfield8 + "';");
         clength = clength + 1;
         counter = counter + 1;
    %>
    </script>
    </FORM>
    </FONT>
    <BR>
    <FORM NAME="CRMEvent">
    <input type="hidden" name=dhr_id value=<%=dhr_id %>>
    <!-- <input type="hidden" name=crmKey value=<%//=crmKey %>> -->
    <input type="hidden" name=mode value=<%=mode%>>
    <table border="0" width="100%" cellspacing="1">
    <tr>
         <%
              if (mode.equals("add")) {
              %>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
    <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('add')"></td>
         <% } else if (mode.equals("edit")){
         %>
    <td width="103"><input type="button" value="<< Previous" name="Previous" onclick="history.go(-1)"></td>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
         <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('edit')"></td>
         <%
         %>
    </tr>
    </table>
    <%
    }; //end else for checking session
    %>
    </FORM>
    <HR>
    Click the next button to move to the next screen without saving the current screen.<br>
    Click the save button to save the current screen and then move to the next screen.<br>
    <p>
    <form name="submitForm" action="dssACCRMEventDB.jsp" action="post">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    </form>
    <form name="validate">
    <input type="hidden" name="validation">
    </form>
    </BODY>
    </HTML>

  • Help needed with Elements 5.0

    Trying to Edit photos.  Click on Edit icon and I get the Message " Attempt to Access invalid address".  Click OK get message "Unable to connect to editor application.
    What is the problem?   I have unenstalled to program and reinstalled, I have tried repairing from CD.  Nothing works.  Please help.

    I have the disc and re-installed a couple of time. No positive result. PSE 09 which I bought thereafter is giving a lot of problems also!!!
    Date: Wed, 8 Jun 2011 10:31:24 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help needed with Elements 5.0
    Doesn't really help either of us very much but I'm also having the same problem with Elements 5. I downloaded the program so I don't have disks to reinstall. And it seems from the other reply that Adobe has given up with the "old program," which incidentally was working fine until two days ago. Maybe I'll have to think about PSE9!
    >

  • Help needed with BBDM 5.0.1 IP Modem

    Hi I was happily connecting thru the Net via the IP Modem in BBDM ver 5.0.1 all this while. Only this happened yesterday. Accidentally during the connection, my 9500 was disconnected from the USB cable. From that moment on, I cannot access the Net using the IP Modem feature. Tried to reboot the laptop as well as the 9500 but now all I get is the connecting message and then a pop up saying there is a hardware failure in the connecting device (or modem) ie the BB 9500.
    I even uninstalled BBDM 5.0.1 and reinstalled ver 5.0 and also updated back to 5.0.1 - same story. I can still access the Net via the BB browser etc
    Advise please thanks in advance

    I have the disc and re-installed a couple of time. No positive result. PSE 09 which I bought thereafter is giving a lot of problems also!!!
    Date: Wed, 8 Jun 2011 10:31:24 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help needed with Elements 5.0
    Doesn't really help either of us very much but I'm also having the same problem with Elements 5. I downloaded the program so I don't have disks to reinstall. And it seems from the other reply that Adobe has given up with the "old program," which incidentally was working fine until two days ago. Maybe I'll have to think about PSE9!
    >

  • Help needed with a design!

    HELP! I need help with designing something!
    IMAGE on this link " http://i1072.photobucket.com/albums/w362/jjnilsson/DSC_0188.jpg "
    i need this patch on the picture to be "remade" in higher definition and the text should be MILF HUNTERS intstead of milf hunter... Anyone that might be able to help me out?
    reson for all this is that its gonna be made to a 30x40cm big patch fitting the back of our Team jackets!
    send me a pm or a mail ([email protected]) if you need any futher info or if you can help me out! I am really thankful for all the help i can get!
    With best regards J. Nilsson, Milf Hunters Mc

    I simply did as i got a tip on FB to do
    quote from adobe themselves on facebook "Adobe Illustrator You might also want to try asking on our forums as there are many people that can help there as well! http://forums.adobe.com/community/illustrator/illustrator_general"
    sry if it was wrong of me, simply thought there might be someone nice out there to give a helping hand
    Date: Tue, 5 Jun 2012 13:41:48 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help needed with a design!
        Re: Help needed with a design!
        created by in Illustrator - View the full discussion
    This really isn't the place to ask for free services.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4467790#4467790
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4467790#4467790. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Illustrator by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for