User Profile

Collapse

Profile Sidebar

Collapse
teneesh
teneesh
Last Activity: Oct 7 '09, 04:14 PM
Joined: Mar 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • teneesh
    started a topic Insert a Carriage Return when coding

    Insert a Carriage Return when coding

    Hi,

    I have a long if then statement, its so long that in the if/then portion, I need to move to the next line. However I do not know what is used to do so.
    Here's the example of my code - but how do I place it on multiple lines without getting an error?

    Code:
     
    Private Sub btnAddNew_Click()
    'add new record
    [B] If (IsNull(Me.text1.Value)) Or (IsNull(Me.text3.Value)) Or (IsNull(Me.text02.Value))  Or[/]
    ...
    See more | Go to post
    Last edited by Stewart Ross; May 18 '09, 07:17 PM. Reason: Removed spaces from code tags

  • teneesh
    started a topic Moving multiple files from one folder to another

    Moving multiple files from one folder to another

    Hi,

    I am using Access to pull in some excel spreadsheets and create tables from them. They appear in one particular subdirectory. However after these spreadsheets are in Access, I'd like to move them all to a new folder. I have been able to code the program to move one - but I need them all to be moved over. Here's what I did:
    Code:
     
    Private Sub Command59_Click()
    Dim fso, f2
    
    Set fso = CreateObject("Scripting.FileSystemObject")
    ...
    See more | Go to post
    Last edited by Stewart Ross; Apr 22 '09, 07:37 PM. Reason: fixed code tags, deleted duplicate question

  • Trying to capture data from one table and place it in another

    Hi,

    I'm trying to find some records in a table that has been exported into Access (tbl_test). The new table that I am trying to create and insert the data to is called (tbl_test1).

    Here's my code - I'm trying to find where the word 'Interval Type' starts to capture the data from there and on down a few rows. The 'Interval Type' row will be the name of the first field in the new table, and then the second row is blank...
    See more | Go to post
    Last edited by NeoPa; Dec 21 '08, 06:42 PM. Reason: Please remember to use the [CODE] tags provided

  • teneesh
    started a topic Import CSV file in Access VBA

    Import CSV file in Access VBA

    I'd like to do an import but not sure how to do it with a CSV file.
    this would be my line of code when using an xlsx file, but how do i do it with a CSV?
    DoCmd.TransferS preadsheet acImport, acSpreadsheetTy peExcel9, "tbl_stats" , "S:\ Go To Sleep\Import Data Code\Actiwatch sample.xlsx", True



    Thank you!
    See more | Go to post

  • Create a table in Access using VBA, from data in excel

    I'm attempting something new, in trying to create a table in VBA coming from excel. I saw an example using ADOB but I don't want to use that, just some plain script.

    I've set up this example to attempt to do it myself and once I can figure it out, I can go into production . . . please help me get rid of the ADOB thing and find a better way.
    Thanks,


    Sub CreateTable_for TP_Table()


    Dim...
    See more | Go to post

  • teneesh
    replied to Left Join -
    here is what i used:

    SELECT A.*, daysoff
    FROM
    (Select r.Eid, AcYear, dbo.idtoservice (s.srvcode)as service,rotatio n,max(pgy) pgy, startdate,endda te,
    SUM(DATEDIFF(da y, StartDate, EndDate) + 1) AS daysworked
    from Schedule s, ViewcurrentResi dents r
    where s.eid=r.eid and s.stfgroup in (3,4)
    and r.eid = 8119
    group by r.eid, acyear, dbo.idtoservice (s.srvcode),rot ation,cast(righ t(degrcode,1)...
    See more | Go to post

    Leave a comment:


  • teneesh
    started a topic Left Join -

    Left Join -

    Hi -
    I'm trying to join these two queries but apparently I don't know how to do a left join for them.

    Select r.Eid, AcYear, dbo.idtoservice (s.srvcode)as service,rotatio n,max(pgy) pgy, startdate,endda te,
    SUM(DATEDIFF(da y, StartDate, EndDate) + 1) AS daysworked
    from Schedule s, ViewcurrentResi dents r
    where s.eid=r.eid and s.stfgroup in (3,4)
    and r.eid = 8119
    ...
    See more | Go to post

  • teneesh
    started a topic Need help with MIN function

    Need help with MIN function

    I'm building a report for my boss and he wants the report to display a field that has the minimum value of all minimal values for 5 min fields.
    so for example,
    when i run this query -
    Select v.evalrecno, dbo.idtoname(ev alteeid)as Faculty, min(q1)as min1,min(q2) as min2,min(q3) as min3,min(q4) as min4,min(q5) as min5, count(*) N from viewr507 v, viewevalissue i, employee e
    where v.evalrecno = I.recno
    and e.eid...
    See more | Go to post

  • Unique Table is nonexistent or not completely specified error

    I created a form in Access to store and retrieve data from a sql server table.

    When i go and try to add a record to the form - i get the error: Unique Table is nonexistent or not completely specified

    however if i try to add the same record to the backend database (in sql server), it gets added perfectly. What am i doing wrong?

    I am using an field called recno as my unique identifier, it is to increment...
    See more | Go to post

  • teneesh
    replied to Counting days in date fields
    found it!!!


    datediff(day,da tefrom, dateto)
    See more | Go to post

    Leave a comment:


  • teneesh
    started a topic Counting days in date fields

    Counting days in date fields

    I have to count the difference between two dates, to determine how many days exist between them. How do I do this? Can someone guide me to a good place please?

    date from date to
    2008-02-18 00:00:00 2008-02-29 00:00:00 - how do i count the number of
    2008-03-01 00:00:00 2008-03-02 00:00:00 days in between?
    2008-03-14 00:00:00 2008-03-16 00:00:00


    thank you
    See more | Go to post

  • teneesh
    started a topic Report on a Form

    Report on a Form

    I'm trying to create a form to display as a report. For example - I need to use the grouping settings on the form, that i always use when creating a report, to provide sums and totals. I cannot seem to find these tools when attempting to create this via a report. Where is the sorting/grouping button for when creating a form?
    Is there not one?

    One of my users is asking for this.
    See more | Go to post

  • Translating a query from SQL Server to the Backend of Access

    I'm trying to get the sqltext query below in a format that VB will accept, it is coded on a button in access. When I type it in, with all quotes around it along with the " & _ things, I still get errors. I'm wondering if i'm missing something because of the internal parentheses. Please help. here is the query. I've taken out all of the quotes and other connotations that didn't help.
    thanks in advance.

    [code=vb]Dim sqltext...
    See more | Go to post
    Last edited by Stewart Ross; May 2 '08, 02:10 PM. Reason: Added code tags to your code - please use the tags to assist readers

  • teneesh
    replied to Function - missing parentheses
    Actually - I figured it out!!! I had to name the last set of parentheses. So after putting t after the second group of parentheses, it worked. Here it is:


    set ANSI_NULLS ON
    set QUOTED_IDENTIFI ER ON
    go


    ALTER FUNCTION [dbo].[ConfAttnRptSmry]

    (

    @acyear smallint

    )

    RETURNS TABLE

    AS

    RETURN
    ...
    See more | Go to post

    Leave a comment:


  • teneesh
    started a topic #Num!

    #Num!

    One of my text fields in a report is:
    =Sum([ConfAttendance])/Sum([ConfOffrate])

    But how do I use the IIF statement on it to prevent the #NUM! error when dividing by zero?


    Thanks!
    See more | Go to post

  • Changing The way a field is viewed on Access Report

    I have a report where the field ConfType is viewed grouped vertically in a ConfType Header. Now I need to change it so that it is viewed horizontally across the page. How the heck do i do this? I thought maybe i had to change my query and do a join to change how the data is stored, but that sounds far more complicated.

    Thanks.
    See more | Go to post

  • teneesh
    started a topic Function - missing parentheses

    Function - missing parentheses

    I'm trying to create a function and the error I keep receiving is that I am missing a ')' in line 34. Line 34 in SQL Server is in bold below:

    from schedule s, serviceward w, (select distinct conftype from confattnsrvrate where acyear=@acyear) c

    Here is all the code for the function.

    set ANSI_NULLS ON
    set QUOTED_IDENTIFI ER ON
    go


    ALTER FUNCTION [dbo].[ConfAttnRpt1] ...
    See more | Go to post

  • teneesh
    replied to Sum Property in Access
    I got it. . . The grouping I was working with, is actually the right way to go. I was just expecting something different. But =Sum([ConfAttendance])/Sum([ConfOffrate]) grouped by name footer did work.
    See more | Go to post

    Leave a comment:


  • teneesh
    started a topic Sum Property in Access

    Sum Property in Access

    I've created a report in access, one of my Sum functions on the report is: =Sum([ConfAttendance])/Sum([ConfOffrate]), which is grouped by Conference Type.
    Now I'd like to provide a total sum, adding up all the values calculated through the =Sum([ConfAttendance])/Sum([ConfOffrate]) formula. It would be like a grand total. And I'm not quite sure how to do it.

    My groupings are by name, conference type. So I was thinking that if...
    See more | Go to post

  • teneesh
    replied to Refresh Detail in Access
    I was missing the:
    me.RecordSource =sqltext,
    I didn't realize it was required....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...