Quantcast
Channel: Access for Developers forum
Viewing all 14673 articles
Browse latest View live

ACCESS VBA to generate query

$
0
0

Hi All,

My ACCESS QUERY 1 uses inner join with 2 tables and generates data like below.

Date                Customer_ID                UNIT                        

9/3/2015             AAA                            300

9/4/2015            BBB                            400

9/5/2015              AAA                           500

9/8/2015             AAA                            600

9/10/2015             CCC                         700

9/12/2015             FFF                            750

9/13/2015             CCC                            250

There is a separate Access table "WeekTbl" which has data like below

WEEK                    DAYS

9/4/2015               9/3/2015 

9/4/2015               9/4/2015

9/4/2015               9/5/2015

9/8/2015               9/7/2015

9/8/2015               9/8/2015

9/8/2015               9/9/2015

9/11/2015             9/10/2015

9/11/2015             9/11/2015

9/11/2015             9/12/2015

 My Requirement - I want to createEXCEL REPORT that shall have data like below.

Week           Count of ID     Total Unit  

9/4/2015      02                  1200   ( Take all days in week 9/4/2015 from WeekTbl, Count Cusotmer-ID 

                                                                and SUM Unit from my access query 1)      

9/8/2015      01                   600    ( Take all days in week 9/8/2015, Count Cusotmer-ID and SUM unit)

9/11/2015     02                  1450    ( Take all days in week 9/11/2015 , Count Cusotmer-ID and SUM unit)


Currently i am copying all the data generated by ACCESS QUERY 1 into excel and apply filter manually by looking which days to include from table  "WeekTbl". Using SUM function i m getting Total units and using COUNTIF to get the count of each ID. But i have nearly 50 weeks to filter each time so its very time consuming process.

I want to automate the process of generating EXCEL REPORTbyVBAor Access query or excel which will do the following

  1. Read each week from table "WeekTbl"
  2. Count number of Customer_ID  for the days that fall under that particular week from my access query 1
  3. Sum Unit for the days that fall under that particular week From my access query 1


Is it possible to create 3 new field in my ACCESS QUERY 1OR create new query which will give Week, Count of ID and SUM of Unit?

Thanks,

Zaveri





What's new in Access 2016 (Preview)

$
0
0

Hello,

is there any article or maybe a video on What's new in Access 2016 (Preview)?

Davor

Is Access Database Engine 2010 supported for Windows Server 2012 R2

$
0
0

Dear Friends, 

                     I have installed Access Database Engine 2010 on Windows Server 2012 R2 (development environment).

https://www.microsoft.com/en-sg/download/details.aspx?id=13255&e6b34bbe-475b-1abd-2c51-b5034bcdd6d2=True

Since in the system requirements Windows Server 2012 R2 is not a supported OS, this engine cannot be deployed to staging and production environment.

I am using this tool to upload data from Excel to SharePoint Server 2013.

Please advise, if there is a higher version of Access Database Engine available or suggest a tool which will pass the compatibility constraint.

Thanks

Access 2013 drops support for adp projects. What alternatives do you suggest?

$
0
0

My main application (Screenshot of a typically complex form attached):

MS Access 2003-2010 adp Project containing 100+ forms including modal dialogs and main forms with header, footer and up to 3 subforms, each looking at their own linked data, 64 reports/subreports and 34 modules including MS Office and Windows API integrations. 

This looks at an SQL 2005-2012 database with 52 Tables, 64 views, 44 stored procs and 38 functions

So what are the viable alternatives to Access 2010 .ADP -> SQL Server 2012?

Requirements:

Rich forms/subforms environment with vb method coding, event handling, report generation, binding to fully relational SQL database with table, view and stored proc objects:

  • Microsoft Lightswitch (Desktop or Web App)

Quick and lean but probably too limited for serious development

  • Sharepoint Designer Lists etc using BDC

Simple for single table interaction, don’t know what potential

  • Sharepoint Visual Web Parts via Visual Studio

Little support for RAD or database bound controls

  • Access 2013 accb with SQL Server linked tables

Path of least resistance. Don’t imagine this supports stored procs etc

  • Access 2013 Sharepoint Web App

MS vision for the future Don’t know much about this yet. Requires specific client environment restricting market but may be the way others want to go.

  • Visual Studio Web App/Windows Forms with only .net Data Controls

Cheap option but hard work. Complex forms with data linked controls are tedious to develop without 3<sup>rd</sup> party tools. No bundled reporting option eg Crystal

  • Visual Studio Web App/Windows Forms with 3rd Party dev tools:

Much easier development but can be expensive and may result in continuing commitment and high dependency on the future/support of the 3rd party. Which of these tools to consider?

What would you do? Or are you already on this road. How are you finding it?

Grateful for any suggestions!

Stephen Solt 

Construction industry database developer

Planchest ltd

Warmington PETERBOROUGH UK

Disable the Maximize button for Access (NOT FORM)

$
0
0

Hey all, I am setting up a database where only the form is accessible to the users. 

I have hidden the navigation and have hidden the ribbon.

I set the form to have no boarder. So the users can activate some buttons and close access. Thats all.

So I set the window in Access to match the size of the foam. I dont want them maximizing access.

I have a 64 bit machine... So please dont give me 32-bit API code


Report sort order!

$
0
0

I am trying to get this report to sort by  InvoiceID Descending ...Thanks for any help.........Bob

Private Sub Report_Open(Cancel As Integer)

If CurrentProject.AllForms("frmHorseInfo").IsLoaded Then
    Report.RecordSource = "SELECT Distinct tblInvoice.InvoiceDate,tblInvoice.InvoiceID AS InvoiceID," _
    & " tblHorseInfo.HorseID, funGetHorse(0,tblHorseInfo.HorseID,false) AS HorseNamed, [StableReturnDate] " _
    & " FROM tblInvoice,tblHorseInfo where tblHorseInfo.HorseID " _
    & " = tblInvoice.HorseID" _
    & " and tblInvoice.HorseID=" & Forms!frmHorseInfo![tbHorseID]
    Report_rptHorseExpenses.tbInvoiceDate.Visible = False
ElseIf CurrentProject.AllForms("frmInvoice").IsLoaded Then
    Report_rptHorseExpenses.tbInvoiceDate.Visible = True

    Report.RecordSource = "SELECT tblInvoice.InvoiceID AS InvoiceID," _
    & " qActiveHorseListFiltered.* FROM tblInvoice," _
    & " qActiveHorseListFiltered where qActiveHorseListFiltered.HorseID=tblInvoice.HorseID And " _
    & " tblInvoice.HorseID=" & Forms!frmInvoice![cbHorseName]


ElseIf CurrentProject.AllForms("frmInvoiceClient").IsLoaded = True Then
    Report_rptHorseExpenses.tbInvoiceDate.Visible = True
    Report.RecordSource = "SELECT tblInvoice.InvoiceID AS InvoiceID," _
    & " qActiveHorseListFiltered.* FROM tblInvoice," _
    & " qActiveHorseListFiltered where qActiveHorseListFiltered.HorseID=tblInvoice.HorseID And " _
    & " tblInvoice.OwnerID=" & Forms!frmInvoiceClient![cbOwnerName]
Debug.Print Report.RecordSource
End If
    Debug.Print "Recordsource = " & Report.RecordSource
End Sub

               

xxx

Can't open my database

$
0
0
I was copying my database from one computer to another. Now when I try to open the database I get the message "The Microsoft Access data base stopped because you and another user are attempting to change the same data at the same time". I am the only user, and can not figure out how to get past this. I have tried to compact and repair database, but I lose many records and the format of my query gets messed up.

Access 2010 Compact And Repair corrupts the database

$
0
0

Recently, every time I run Compact and Repair (or Backup Database) on a particular 1.7GB database accdb file using Access 2010 on my PC, the compact and repair process randomly removes one or more of the larger tables, and a MSysCompactError table appears containing records like the following:

<tfoot></tfoot>
MSysCompactError
ErrorCodeErrorDescriptionErrorRecidErrorTable
-1011System resource exceeded.
tbl_SOM_HRAP_Status

The table(s) removed are not consistent; the next time I try this, one or more other tables may be dropped.

I've tried increasing the MaxLocksPerFile settings in the registry from 9500 to 100000 without success.

This problem is specific to my PC.  On a co-worker's machine (which has the same hardware and software specifications), the same accdb file compacts without problem every time.


AMWild


Unable to open .mdb file please help

$
0
0

Unable to open .mdb file please help!

i get this error "The Microsoft office access database engine could not find the object 'Databases'. and that you spell its name and the path name correctly"

Access Web Database- Navigation Form subform Blinking

$
0
0

Navigation form tab contains a form with, 1.dropdown box, 2. subform details, 3. 1&2 linked Master/Child.

When dropdown box item selected a Browse-To is activated with a filter of ddbx value.

The Browse screen then goes through numerous series blinking before the screen form finishes loading with the correct data.

Why the blinking???

How to stop???


allan dragton


Record Timestamp When A Record Is Created or a Lookup Field is changed

$
0
0

I have this database in which I've queried the fields to Sort according to creation date.  Upon the Lookup field Status(text), even if it changes to another value, I want a timestamp to update automatically when it was changed.

I'm sure this is simple VB code but I've not been in the loop for sometime.

sql statement getting error message

$
0
0

Hello.  I am having an issue with the following sql statement.  I placed a message box after it and got the info back.  The time and the record id and record type id all show in the message box as they should.  But I am still getting the error below.  I am pulling my hair out on why I'm getting this error.  This is not the first INSERT INTO done today.  The Acc2013 is linked to a sql server db backend.   Hoping someone could look at this and see what the issue is as I'm running out of hair.

Thanks.

...John

        sqlInsert = "INSERT INTO dbo_tblNote (OriginationDate, Originator, Subject, Note, Remove, RecordID, RecordTypeID) " & _"VALUES ('" & Now() & "', txtOriginator, txtSubject, txtNote, chkRemove, " & Forms!frmUnit!txtUnitID & ", " & Forms!frmUnit!lblRecordTypeID.Caption & ")"

Access prediction

$
0
0

Hello,

I have 2 tables with my database. The first table has  numbers for each date for the last ten years Ex. 123 was on 10/1/2013. I want to be able to see what see 2 dates and 2 days after a number/ Ex. If 123 was on 10/1/2013. I want to be able to see the number that came two days before 10/1/2013 and 2 days after 10/1/2013. So if 123 came on 10/1/2013 I want to see the number that came on 9/29/2013, 9/30/2013 and 10/2/2013 and 10/3/2013

Cannot open any more databases. (Error 3048) Is there a way to see whats open (maybe hidden)

$
0
0

Hi

I am running Access 2013.
Getting the message "Cannot open any more databases (Error 3048)"

But "nothing" is open. I had some reports open in preview but they are closed.
Then when I try to open another report (Invoice) the "Cannot open any more databases" appears.

If I close the whole database and then open the Invoice again, there is no problems or errors.

Is there a way to see whats open?
What can be done?


Best // Peter Forss Stockholm and Sigtuna GMT +1.00

access pass parameters to two subreports when opening report

$
0
0

I have an Access report which shows two separate weeks of time clock information.  I need each week to be separate so I can calculate overtime for each week, so I've put each week into a subreport on a master report. 

I want to pass a week number parameter to each subreport so I get the correct two weeks for a particular pay period. 

The master report lists data from each week, then gives me grand totals in a group footer for each employee. 

My problem is that when I run the report, the parameter value box keeps popping up constantly.  I think it keeps popping up as many times as I have employees, and then a couple extra times as well.



Access 2013 Web Apps: Updating "Last Update date" field after any change in the table row

$
0
0

When any data field in a records is inserted or updated, I want to update the "Last Updated" date field with today's date and time.  In Access 2013 desktop, this is easy but I have not found an easy way to do it in Access 2013 Web Apps without inspecting each data field during an event macro (Insert/Update).  

In Desktop Access I have used the "Before Change" data macro for each table to set field on the Last Updated field to Now(). Easy!

How can I easily do it in my Access 2013 web app?  You help is appreciated.

Are there a dramatic diffrences between Access 2007 VBA and 2013

$
0
0

Dear All,

I have a book on Access 2007 VBA but I am working in Access 2013 now. Can I use this book for learning Access 2013 VBA or it is not recommended.

Regards,


Regards,

Web form macros: Are cascading combo boxes possible in web forms?

$
0
0
I have read a number of declarations that cascading combo boxes aren't supported in Access Services applications, but Albert Kallal has suggested that there is a way. Does anybody know?
Dave

The query failed to execute because the identifier could not be found

$
0
0

I am attempting to build a web compatible database on SharePoint. I have 2 tables: ProjectName and Database. I want the dbProjNum and dbProjDescription field in the Database table to only include values from the ProjectName table pnProjNum and pnProjDescription. To do this I am using the Before Change macro however I keep getting "The query failed to execute because the identifier could not be found" the following coding is used:

Look Up A Record In ProjectName

Where Condition - [dbProjNum] = [ProjectName].[pnProjNum] AND [dbProjDescription]=[ProjectName].[pnProjDescription]

Alias dbProjNum

I am using Microsoft Access 2010

Maximum length of filename for TransferText

$
0
0

Running Access 2007, if I try:

    DoCmd.TransferText TransferType:=acImportDelim, _
      SpecificationName:="MyReportImportSpecification", _
      TableName:="MyTableToImportTo", _
      FileName:="full path to text file with really long name.txt"

and the FileName contains a name (but not path) of more than 64 characters, I get errNo 3125.  The err.Descripion is '...really long name...' is not a valid name.  Make sure that it does not include invalid characters or punctuation and that it is not too long.

Is there some maximum length of file name TransferText can use?



Viewing all 14673 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>