I'd sure like to drag fields from the field list onto a report without a label automatically showing with it. I have so many fields to deal with the time just to click it gone adds up.
I'm trying to build a query that adds up the total sales for a given product per date. The problem I'm running into is some products have $0 sales on a given day and don't appear in the table I'm querying. How would I get the query to add a record for that day for the given product with 0 in the sales field?
To give more details, I currently have one table showing the sales data. It has a record for every sale that includes the product of the sale, the amount, and the date. In the query, I'm summing the sales for a given day and product. Then I plan to export to Excel where I will run additional analysis.
If there are no sales for the product in a day, I'd like it to list the date and product with a $0 in the sales column.
I'm working on a report. I have a text box that contains directory path for a picture which is showed in a image box on my report which works great. I have now created a label called "nopiclb" that has "no Pic "entered in it but I want to set the label to not visible if path1 has a file path in it but visible if path1 is empty
I put the code below in onformat event in the detail section, but is not working
Code: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If IsNull(Me.path1) = True Or Me.path1 = "" Then Me.Nopiclb.Visible = True Else Me.Nopiclb.Visible = False End If End Sub
I am trying to make a label visible on a form during print if a field has "like a string". We use a form so that it prints 3 forms to one page (They are tags for units for repair). I can get the label to be visible in the form view but when I print, the label is visible on every record where it is only visible on the current record in form view. My goal is to have the label only show on those records where the condition is met.
Here is my code that works in form view only: (It is to designate easier a warranty tag from a new repair tag)
Code: If Me.Problem_Description Like "Warr*" Then Me.lbl_w.Visible = True Else Me.lbl_w.Visible = False End If
I have attached an image of a tag sheet Tag_Sheet_W.jpg. As you can see if I got my desired result only the first tag would have a W.
I have a query call courses and field name expiry date I have add additional field within the query to show how many day left and how many days over the expiry date
Code : DayLeft:[expirydate]-now()
but i just get a error when i run the query
I also would like to ask is this possible to be done within the table e.g adding another field dayleft and some how add formula to calculate number days left or over due .
We have a button running a SQL query via VBA, how can I make it so the results doesn't show up in a table/preview?Also, I know it's for the SQL forum but how can I make a text box to show the results of a query to display it on screen?
I have a query and I need the records to display 3 working days before the 15 working day deadline.
I used the following in the criteria box below the received date field and it doesn't pull the correct number of workdays, it's pulling calendar days instead.
I have a query and I need the records to display 3 working days before the 15 working day deadline.
I used the following in the criteria box below the received date field and it doesn't pull the correct number of workdays, it's pulling calendar days instead.
I've been using Allen Browns method [URL] to copy form and sub form data, and it works perfectly after some adaptation.
It changes dates to today from whatever the date 'was'.. perfect.. however, as I'm still learning SQL, is there a way, to make the copied subform's date into today as well...this is my adapted code from the SQL part..
Code: 'Duplicate the related records: append query. If Forms!FRMREGISTERMain!frmJustSubRecordsDEPOSITS.Form.RecordsetClone.RecordCount > 0 Then strSql = "INSERT INTO [tblSplits] ( TopLineID, TransDate, Memo, Category, SubCategory, Credit, Debit) " & _
[Code].....
As I'm still learning, am I right in thinking that I'll use SELECT and/or WHERE somewhere in there?
I have a report that displays on a continuous style report. What courses the employee have been on and when they expire
right I have field call expirydate and another call dayover showing the number of days till that course has expired also I have made a label called Expired1
now what I'm trying to do.....
if the expirydate has passed I want the expired1 label to be visible and dayover field to become invisible
I have tried
Code: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.Expirydate < Date Then Me.expired1.Visible = True Me.DaysOver.Visible = False End If If Me.Expirydate > Date Then Me.expired1.Value = False Me.DaysOver.Value = True End If
I have also tried the code on current event on the report
now my problem if one of the course has expired it will show the label called Expired1 but on all the records but I only want it to display on the record that has expired and leave the daysover text box visible if course has not expired
This is fairly simple i think although i cant do it right i have a field in a query named; "shiftdates" which uses the format: DD/MM/YYYY, how can i set the criteria for this to only show records from the past 7 days?
i think i need something like: date()-7 (this doesnt work though), anyone help me out?, :o
I have 2 tables on one report, 1 is visible, the other visible = no, Is there a way to make that visible = yes when you reach a certain count (60days)...
I want to display the ID of a dataset in a form but I don't want the user to be able to edit it. Therefore I want to display the id in a label and not a textbox or combo etc.
I can't see a way of how to do this though. Is this possible, or am I going about it the wrong way?
I want to show all the days in the specific month, e.g. there are 29 days in february 2008 and the records will display all the days that are available as below: 1/2/08 2/2/08 3/2/08 .. .. .. 29/2/08
I'm trying to create a query that has a calculated field that shows a maximum value from multiple fields.
As far as I can find, this is not built into Access, so I've used this code from a Microsoft page:
Code: Function Maximum(ParamArray FieldArray() As Variant) ' Declare the two local variables. Dim I As Integer Dim currentVal As Variant ' Set the variable currentVal equal to the array of values.
[code]....
The problem I'm having is, well this doesn't work for me.I'm a bit of an beginner VBA coder, but I understand this code and don't know why it won't work.It only displays the value from the field within the brackets.The values used are Dates, so I need to display the latest date from multiple fields.
I am new to access 2010. I have a table called "Forecasts", and I wish to update the timestamp with todays date, whenever the user makes a change to the qty of goods forecasted.
I have been researching online for the solution to the correct format to datetime, but it doesnt seem to work.
Code: Dim todayDate As Date todayDate = Date Dim sqlString As String sqlString = "UPDATE [Forecasts] " & _
[Code] .....
The messagebox shows:
UPDATE [Forecast] SET Branch_Plant=123, Item_Number_Short='222', Description='AAA', UOM='EA', Estimated_Cost=123, Requesting_Business_Unit='AAA', End_Customer='CCC', Project ='Secret', Timestamp=#26/12/2013# WHERE ID =24
Then I hit a syntax error. Whats wrong with sqlString?
I have a report base on my table. Here a check box. I wanna show two label text hide/show base on when check is true or false. It will be when report will be open. I have try this but nothing is happened.
Code: If AffecteAc= True Then affected.Visible = True general.Visible = False End If
I need to calculate the passed working days and show them in a form. I should be also able to use the number in a query later on. in excel I use the formula to get the days passed:
Code: =IF(ISERROR(MATCH(F10,Dictionary!C:C,0)),NETWORKDAYS(D10, TODAY(), Dictionary!$E$2:$E$43),"Status Excluded") D = "Date_uploaded" in access table "tbl_All_Cases" F = "Status_Case" in access table "tbl_All_Cases" c:c = dictionary case status E:E = dictionary holidays
"Status Excluded" will show up in the cell if a case has one of the status from the dictionary..I created a table: tbl_Dictionary where there are 2 fields: "Case_Status" and "Holidays".How can I translate the above formula into something that access will understand?
What's the formula we can use to calculate days between no of days between date job is open and today's date in a query. I am using formulat below formula but the DATE_OPEN and Today (todays date) pops us as enter parameter value. I dont want those enter parameter windows pops us. The date job is open is in a linked table and linked table is getting the information from BPCS software. The date in Liinked is in format YYYYMMDD.
Total Days: DateDiff("d",[Date_Open],[Today])
The SQL Details are below. AUNPRDF_AAA802 is a linked table and information gets updated on 12 am everyday
SELECT DateDiff("d",[Date_Open],[Today]) AS [Total Days], AUNPRDF_AAA802.AAAGE AS Age, AUNPRDF_AAA802.AAORD AS [Job Number], AUNPRDF_AAA802.AAWKSP AS Workshop, AUNPRDF_AAA802.AASWKT AS WorkType, AUNPRDF_AAA802.AANAME AS [Customer Name], AUNPRDF_AAA802.AANME AS [Service Admin], AUNPRDF_AAA802.AASDE1 AS Complaint,
I have a form where the user enters a date into a field (box 1). Next they select a time frame in days from a drop down (box 2). What I want is for Access to take the date entered from box 1 add the number of days selected from box 2 and place the new (later) date into box 3. From there I can run simple queries. It's for a small data base to track the recall of pacemaker patients.
I enter their appointmet (today) date 1st box and then select whether they should return in 30, 90, or 180 days for a follow up 2nd box. When I choose the interval I want a 3rd box to automatically show their next appointment due date.
I am obviously not an Access expert and I think this should be simple. But 3 cups of coffee and 2 handfuls of my own hair have taken me further from a solution. THANK YOU for looking!!