Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: wuju
  • Order by date
  1. wuju

    Convert Measurement in Access VBA and update the same Access table

    I got it. Thanks PHV. As you my mentor, could you help me general question below? It seems like it can code as VBA or sql. What case VBA prefers over sql and vise versa? thanks for your great help. wuju
  2. wuju

    Convert Measurement in Access VBA and update the same Access table

    Hello PHV, My data type in Access 2007 is just NUMBER, so I am not sure it is Single or integer, or something else. My answer to you as Single is what I actually want it to be. I scrolled down to choose type of data, Access 2007 gives the choice of number, autonumber, text,....., but not a...
  3. wuju

    Convert Measurement in Access VBA and update the same Access table

    Yes, dhookom. My coding below is working. UPDATE importMeter_t SET 1 = [1]/1000, 2 = [2]/1000, 3 = [3]/1000, 4 = [4]/1000, 5 = [5]/1000, 6 = [6]/1000, 7 = [7]/1000, 8 = [8]/1000, 9 = [9]/1000, 10 = [10]/1000, 11 = [11]/1000, 12 = [12]/1000, 13 = [13]/1000, 14 = [14]/1000, 15 = [15]/1000, 16 =...
  4. wuju

    Convert Measurement in Access VBA and update the same Access table

    by the way, at least I have solution for having backward. MWh to KWh and [1]/[1]*1000. If you can help me in KWH to MWh in three decimal, it is good, otherwise I change to Wh to KWh and [1]/[1]*1000. Thank you for your great help. regards, wuju
  5. wuju

    Convert Measurement in Access VBA and update the same Access table

    the data type of the 1,2,...,24 fields is SINGLE
  6. wuju

    Convert Measurement in Access VBA and update the same Access table

    Sorry. It is upto 24. Are you suggesting for me to run on sql or VBA?
  7. wuju

    Convert Measurement in Access VBA and update the same Access table

    Hi PHV, Thank you for your advise. It looks like working well except that it always have integer number. I want to keep decimal point (up to .001) Is it possible to convert KWh to MWh in three decimal? For example, if 1234 KWh then I want to see 1.234 MWh. Please let me know if you have idea...
  8. wuju

    Convert Measurement in Access VBA and update the same Access table

    Hi Dhoocom, I coded as below as you suggested and ran it. Nothing happended in my importMeter_t. Could you help me out why this is not working? Regards, Wuju FYI, the following is my coding. Option Compare Database Option Explicit Private Sub convertKWh2MWh() Dim strSQL As String strSQL...
  9. wuju

    Convert Measurement in Access VBA and update the same Access table

    hi MajP, Thank you for your great help. Even though I am new to the VBA, I would like to coding, so your help has been great. Method to having sql to select the desired records to convert in MWh is good, but original MWh data in importMeter_t is removed since sql only select the data which...
  10. wuju

    Convert Measurement in Access VBA and update the same Access table

    Hi MajP, Can I just conditioning with pID as below? If rs.Fields("pID") <= 22 Or (rs.Fields("pID") >= 51 And rs.Fields("pID") <= 57) Or rs.Fields("pID") = 63 Then Option Compare Database Option Explicit Public Sub covertKtoM() 'your name here Const tblName = "importMeter_t" Dim i As...
  11. wuju

    Convert Measurement in Access VBA and update the same Access table

    Hi MajP, Thank you for your advise. It seems like you have very good idea, and I really want to follow your direction. Since I am new to the database, sql and VBA (I just started to learn database two month ago), I kinda understant your advise, but not quite whole things especially making sql...
  12. wuju

    Convert Measurement in Access VBA and update the same Access table

    Thanks majP for quick respond. Some of data are in MWh even though numbers are more than 1000. I would like sort and convert data in KWh to MWh based on pID. I know which pID are in KWh(pDI= 1~22, 51~57, and 63) and which are in MWh(pID=58~62, and 64~66). So could you give example of coding...
  13. wuju

    Convert Measurement in Access VBA and update the same Access table

    Howdy, I need to convert some records (not all) in my access table to match with same unit. I have a access table with mismatch in unit: some in kilowatt and some in megawatt. I want to unify unit in megawatt and update the table. The following is the access table I have with fields pID...
  14. wuju

    Convert Measurement in Access VBA and update the same Access table

    Howdy, I need to convert some records (not all) in my access table to match with same unit. I have a access table with mismatch in unit: some in kilowatt and some in megawatt. I want to unify unit in megawatt and update the table. The following is the access table I have with fields pID...
  15. wuju

    automate data converting (import) task from 2003 Excel to 2007 Access

    One of thing I want to do is to automate data converting (import) task from 2003 Excel to 2007 Access using visual basic. There is an obstacle. Data in Excel are different format than I want to have in Access table, so can’t just use built-in importing step in Access. What is the best way...

Part and Inventory Search

Back
Top