Results 1 to 9 of 9

Double Handling within working code Write to access and fire access macro

Threaded View

robtuby Double Handling within... 02-11-2015, 09:08 AM
Norie Re: Double Handling within... 02-11-2015, 09:14 AM
robtuby Re: Double Handling within... 02-11-2015, 09:20 AM
Norie Re: Double Handling within... 02-11-2015, 09:35 AM
robtuby Re: Double Handling within... 02-11-2015, 09:54 AM
Norie Re: Double Handling within... 02-11-2015, 11:42 AM
robtuby Re: Double Handling within... 02-11-2015, 11:51 AM
Norie Re: Double Handling within... 02-11-2015, 11:55 AM
robtuby Re: Double Handling within... 02-11-2015, 12:19 PM
  1. #3
    Registered User
    Join Date
    10-22-2014
    Location
    Birmingham UK
    MS-Off Ver
    Various
    Posts
    55

    Re: Double Handling within working code Write to access and fire access macro

    I Believe I could but i would need some support converting the access queries that are running so they would work in Excel.

    Ive posted some examples below of the queries in access.
    UPDATE Dates INNER JOIN Archive ON Dates.Dates = Archive.CalendarDate SET Archive.PlanYr = IIf([Archive].[CalendarDate]=[Dates].[Dates],1,0);
    DELETE Archive.*, Archive.UploadDate, Archive.PlanYr
    FROM Archive
    WHERE (((Archive.UploadDate)=Date()) AND ((Archive.PlanYr)="1"));
    INSERT INTO Archive ( CalendarDate, Details, Name, funct, TeamName, Location, Location2, Skill, UploadDate )
    SELECT Dates.Dates, dbo_tbl_activity.Details, dbo_tbl_staff.Name, dbo_tbl_function.funct, dbo_tbl_cluster.TeamName, dbo_tbl_location.Location, dbo_tbl_location.LocationCode, dbo_tbl_skill.Skill, Date() AS Expr1
    FROM Dates INNER JOIN ((((dbo_tbl_function INNER JOIN (dbo_tbl_activitytype INNER JOIN (dbo_tbl_activity INNER JOIN dbo_tbl_staff ON dbo_tbl_activity.idstaff = dbo_tbl_staff.id) ON dbo_tbl_activitytype.id = dbo_tbl_activity.Activitytype) ON dbo_tbl_function.id = dbo_tbl_staff.Funct) INNER JOIN dbo_tbl_cluster ON dbo_tbl_staff.Cluster = dbo_tbl_cluster.id) INNER JOIN dbo_tbl_location ON dbo_tbl_activity.Location = dbo_tbl_location.id) INNER JOIN dbo_tbl_skill ON dbo_tbl_staff.Skill = dbo_tbl_skill.id) ON Dates.Dates = dbo_tbl_activity.StartDate;
    [/CODE]
    UPDATE Archive SET Archive.HashTag = (IIf(IsNull([Details]),"#Free",IIf(InStr([Details],"#")>0,IIf(InStr(InStr([Details],"#"),[Details]," ")>0,Mid([Details],InStr([Details],"#"),InStr(InStr([Details],"#"),[Details]," ")-InStr([Details],"#")),Mid([Details],InStr([Details],"#"),999)),IIf(InStr([Details],"Bank Holiday")>0,"#hols",IIf(InStr([Details],"Holiday")>0 Or InStr([Details],"Leave")>0,"#Hols",IIf(InStr([Details],"Training")>0,"#Trng",IIf(InStr([Details],"Routine")>0,"#ROUT",IIf(InStr([Details],"left")>0,"#left",IIf(InStr([Details],"Directed")>0,"",IIf(InStr([Details],"Dutie")>0,"#Other",IIf(InStr([Details],"prep")>0,"#Prep",IIf(InStr([Details],"maint")>0,"#mtce"))))))))))))
    WHERE (((Archive.HashTag) Is Null) AND ((Archive.UploadDate)=Date()));

    [/CODE]
    Last edited by robtuby; 02-11-2015 at 09:21 AM. Reason: Code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Access form works with access Viewer but not full version of Access?
    By Shanyn in forum Access Tables & Databases
    Replies: 1
    Last Post: 10-22-2014, 01:14 PM
  2. Is it possible to write macro to access multiple workbook in a directory
    By Manoj Vasanth G in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2014, 07:45 AM
  3. Make the code working for Access backend
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-27-2011, 03:29 AM
  4. Only execute code on a write-access basis, not read-only
    By thompsy121 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2009, 07:02 AM
  5. Fire Access Make-Table Query from Excel
    By afiack in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2007, 07:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1