User Profile

Collapse

Profile Sidebar

Collapse
nico3334
nico3334
Last Activity: Dec 18 '07, 06:33 PM
Joined: Aug 31 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nico3334
    started a topic Select Just Primary Keys from db?

    Select Just Primary Keys from db?

    Hi,

    Is there a way to create a query that selects only the primary keys from a table such as syscolumns or any other table?

    Thanks!
    See more | Go to post

  • nico3334
    started a topic DataGrid Jump to Specific Row

    DataGrid Jump to Specific Row

    I have a DataGrid that Refreshes Automatically after being saved. This is fine except that it automatically selects the 1st row of the grid after it saves. I would like it to stay on the row that was just modified. I have a variable that stores the row that is clicked on, I just don't know how to code VB so that it jumps to that row.

    I tried "DataGrid.R ow = intRow", but it still goes to the first row.

    T...
    See more | Go to post

  • nico3334
    started a topic AfterUpdate for ComboBox in VB6?

    AfterUpdate for ComboBox in VB6?

    I would like to use the AfterUpdate option for a combobox in VB6. When the user selects a different item from the combobox, I want a label's caption to change. I accomplished this in VBA, but I haven't gotten it to work in VB6. Is this possible?

    Thanks!
    See more | Go to post

  • Using 2 Items for Combo Box? Displayed Choice and Underlying Value

    Hi,

    I am pulling data from a SQL table to build a combo box in Visual Basic. Is there a way to use 2 columns for the combo box: one that displays the choice and another to be the actual value?

    I have two columns: "Descriptio n" and "ID", I want the users to be able to see the Description column as the choices, and the "ID" column will be underlying as the actual value.

    Here...
    See more | Go to post

  • nico3334
    started a topic More than 1 "LEFT OUTER JOIN"

    More than 1 "LEFT OUTER JOIN"

    I have a query that currently pulls data from a main table and a second table using LEFT OUTER JOIN. I know how to do make another LEFT OUTER JOIN with the main table, but I want to add another LEFT OUTER JOIN to the second table. So I want the third table to be joined through the second table, not the main table.

    Here is my original code that joins the main table and the second table

    SELECT t1.supply,
    t2.inventory,...
    See more | Go to post

  • nico3334
    replied to Convert "Jan" to "01"
    Thank you for your help!

    Just to build on that question. Is there a way to display "01" from a field that displays a full date: 1/1/2007.

    For example, if the date displayed was 7/4/2007, I want to covert it to "07".

    Thanks!...
    See more | Go to post

    Leave a comment:


  • nico3334
    started a topic Convert "Jan" to "01"

    Convert "Jan" to "01"

    Hi,

    I am trying to convert a month data field column from "Jan" to "01". Or for february: "Feb" to "02". So the month displays in "mm" format.

    Can someone help me code this in VB?

    Thanks
    See more | Go to post

  • nico3334
    started a topic DTS Local Package - Date Formatting

    DTS Local Package - Date Formatting

    Hi, I am coding a DTS Local Package that transfers Access Data into SQL Data. I am pulling 2 fields: a month and a year. The month format is "Jan, Feb, Mar, Apr, May, Jun, etc.), the year format is "2007, 2008, 2009, etc". What I want to do is put these 2 fields together into one column in SQL in this format: "200701" instead of "2007Jan". Or for Feb: "200702".

    Here is the code that...
    See more | Go to post

  • nico3334
    started a topic Delete All Records From All Tables

    Delete All Records From All Tables

    I am trying to delete all records from all tables in Access through VB coding. I would like to do it dynamically in case new tables are added. Here is what I have so far:

    I have a form with a command button. When it is clicked, here is the code:
    [code=vb]
    Private Sub Command0_Click( )

    DoCmd.SetWarnin gs False

    DoCmd.RunSQL "DELETE * FROM [Table];"

    DoCmd.SetWarnin gs...
    See more | Go to post
    Last edited by debasisdas; Nov 10 '07, 06:50 AM. Reason: Formatted using code=vb tag.

  • Using Array Within For Statement to Call Dynamic Procedure

    Hi,

    I have an IF..Then statement that I am using to determine which procedure to Call. Within the "else" section, I want to use a For..Next coding to loop through 3 different "call procedures". Here is what I have so far:


    Dim arrCall As Variant
    ReDim arrCall(2)

    arrCall(0) = "GetData1"
    arrCall(1) = "GetData2"
    arrCall(2) = "GetData3"...
    See more | Go to post

  • Problem with Passing Values Between Procedures

    I am creating a report that pulls values from a SQL table in visual basic. I have 3 main procedures.

    The Main procedure PrintInitialize CALLS 2 other procedures during its coding:

    GetTempData

    and

    PrintReportData

    My problem is that GetTempData creates a dynamic table name called strTempName and I want the PrintReportData procedure to recognize what this value is. I'm not...
    See more | Go to post

  • Thank you so much for your help!...
    See more | Go to post

    Leave a comment:


  • Thank you so much for your help. I'm sorry, I'm still getting an error. In SQL Query Analyzer, I get the following message:

    Server: Msg 207, Level 16, State 3, Line 1
    Invalid column name 'Total'.
    Server: Msg 207, Level 16, State 1, Line 1
    Invalid column name 'Total'.

    So, it's not recognizing the Total Columns in the 2nd last line:

    HAVING Total = MAX(Total)

    Thanks again...
    See more | Go to post

    Leave a comment:


  • Thank you that works great!

    One more thing, would it be possible to also select the "day" of the date that is associated with that Max value?

    I tried something like this, but it didn't work:

    SELECT
    MAX(intermediat e.Total), Max_Day
    FROM
    (
    SELECT SUM(Data) as Total
    Day(Date) As Max_Day
    FROM database
    WHERE Month(Date)...
    See more | Go to post

    Leave a comment:


  • Thanks for your reply. But, is there a way to do it without temp tables?...
    See more | Go to post

    Leave a comment:


  • nico3334
    started a topic Query Help: Select Max of Grouped Sum Data

    Query Help: Select Max of Grouped Sum Data

    I have a database that has a Date column (1/1/2007) and a Data column that has numerical data. I am currently running a query to sum the Data column for a certain month and grouped by day (There is more than items of Data for a specific Day). Here is my current query:

    SELECT SUM(Data) as Total
    FROM database
    WHERE Month(Date) = 10
    And Year(Date) = 2007
    Group by Day(Date)

    This displays the...
    See more | Go to post

  • nico3334
    started a topic Trouble with Query using MAX

    Trouble with Query using MAX

    I'm having trouble with a query using "MAX". In my query I'm trying to use 2 date columns as my criteria. Here is the format for each column:

    Date1:
    01/01/2007

    Date2:
    200701

    For my query, I'm trying to pull the Date1 values where the month of Date1 equals the Max month of Date2. Here is my coding:

    Select Date1
    FROM Table1
    WHERE Month(Date1) = MAX(RIGHT(Date2 ,...
    See more | Go to post

  • Thanks for your reply. I think I want it to display like this:

    Ary3(2,1)
    1 - 7
    2 - 8
    3 - 9
    See more | Go to post

    Leave a comment:


  • Trouble with Multidimensional Array Looping.

    I'm having problems with my code concerning a mulitdimensiona l array. Basically, I'm trying to create an array (arrTotal) which contains all of the data from 2 arrays (arrOne & arrTwo). Basically, they each contain data from Tables, and I just want to combine them into a single array which contains all of the info. Here's what I have so far, but I know something isn't right:


    Dim i As Integer
    Dim j As Integer...
    See more | Go to post

  • Could someone help me with the actual SQL coding? Thanks.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...