Header & Detail Keys
Apr 22, 2008
Straghtforward problem I hope!
Header table keyed on ProjectID
Detail file keyed on ProjectID and then IssueID
IssueID shoud start at 1 for each project, then 2,3,4 etc.
Autonumber seems to just increment by 1 regardless of ProjectId, rather than within it.
I'm new to Access, so what options do I have for autonumbering, or what other technique can I use?
Thanks in advance
View Replies
ADVERTISEMENT
Aug 13, 2013
I'm trying to create a report where I can use a section header as a hyperlink to show/hide detail, but only for that section. For example, my customer names are:
Code:
ABC Co.
ZYX Co.
123 Co.
If I click on ZYX Co., I want it to show the contracts for ONLY that customer:
Code:
ABC Co.
ZYX Co.
Contract 1
Contract 2
123 Co.
Right now, my code looks like this for On_Click:
Code:
If Me.Detail.Visible = False Then
Me.Detail.Visible = True
Else
Me.Detail.Visible = False
End If
But it shows and hides detail for ALL customers when I do this. Is there a way to only show/hide for the customer on which I click?
View 1 Replies
View Related
Aug 12, 2007
I have made a small text box in the header area, as to be able to tab from the header area to the detail area, and put the code Me.[Date Sold].SetFocus (Date Sold being the name of the text box I would like to tab to) in the "Got Focus" event. However for some reason it does not work, I get an "Invalid outside procedure" error every time.
Any advice on how to fix this problem would be most welcome.
View 3 Replies
View Related
Oct 28, 2014
In my report when the Group Header and the Detail section will not fit onto one page, it prints the Group Header on one page, and all of the Detail on another page. Is there a way to keep them together?
I have already tried the 'Keep Together' option in the Sorting/Grouping window, setting it to both Whole Group and With First Detail, but nothing seems to work.
My report has an empty Page Header, a Group Header, Detail, and an empty Page Footer.
View 1 Replies
View Related
Jan 6, 2006
I have a continuous form, with data entry fields in both the form header and the detail section.
I've attached an "On Exit" event to the ProdQty field in the detail section. The prime function of the event code is to run an update query on the table (which is the data source for the form).
The code executes properly (update query runs successfully and form refreshes) when I Tab out of that field. It also executes properly when I use the mouse to click on another field in the detail section.
However, when I use the mouse to click on a field in the form header or form footer sections, the On Exit code does not execute properly.
Here's the On Exit Sub:
Private Sub ProdQty_Exit(Cancel As Integer)
On Error GoTo ProdQty_Error
If (Int(Me!ProdQty) <> Me!ProdQty) Or ((Me!ProdQty / Me!LDU) < 1) Or (Int(Me!ProdQty / Me!LDU) <> (Me!ProdQty / Me!LDU)) Then
Me.ProdQty.BackColor = 255
Me.ProdQty.ForeColor = 16777215
Beep
MsgBox "The quantity you entered is invalid for this product." & vbCrLf & vbCrLf & "Please check the LDU (least divisible unit) and enter a new quantity.", vbExclamation, "Quantity Error"
DoCmd.GoToRecord acActiveDataObject, "Order Form", acPrevious
DoCmd.GoToRecord acActiveDataObject, "Order Form", acNext
DoCmd.GoToControl "ProdQty"
Exit Sub
Else
Me.ProdQty.BackColor = 255
Me.ProdQty.BackColor = 16777215
Me.ProdQty.ForeColor = 0
DoCmd.SetWarnings False
DoCmd.OpenQuery "Update Product Qty in Current Order", acViewNormal, acEdit
Me.Requery
Me.Refresh
Me.Repaint
DoCmd.GoToControl "ProductCombo"
End If
ProdQty_Error:
Exit Sub
End Sub
Here's the Update Query:
UPDATE [Current Order] INNER JOIN Products ON [Current Order].[Product #] = Products.[Product #] SET [Current Order].Quantity = Forms![Order Form]!ProdQty, [Current Order].Price = IIf([Forms]![Order Form]![PriceCodeCombo]="CS",[Products]![Contract Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="EDW",[Products]![Ed Wholesale]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R2",[Products]![R2 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R3",[Products]![R3 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R4",[Products]![R4 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R5",[Products]![R5 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R6",[Products]![R6 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="W",[Products]![Wholesale Net]))))))))
WHERE ((([Current Order].[Product #])=[Forms]![Order Form]![Product1]));
I tried copying that code to "After Update", "On Change", and "On Lost Focus" events but the results were the same.
Any suggestions would be greatly appreciated. Thanks!
View 5 Replies
View Related
Jul 10, 2013
A user requested a change that would change the form header and detail back ground color to white when they click the button print record and then change the color back all in one click after the record prints. I keeping getting a run time error, type mismatch on the line where to code is to be changed. The colors are numbers not vbColors. I am using Access 2007.
Code:
Me.FormHeader.BackColor = "#FFFFFF"
Me.Detail.BackColor = "#FFFFFF"
View 3 Replies
View Related
Dec 30, 2004
I have a main report with 2 subreports. My main report has a header section, the 2 subreports are in the detail section of my main report. How can i prevent my report from splitting up my header and my subreports. (Header section of my main report is a company and the subreports are the detail of the company.. i don't want my compnay name on the bottom of a page and then the detail on the next page.. it does this sometimes. thanks!
View 5 Replies
View Related
Aug 20, 2013
Is there a simple way, or special event, that can be used to turn off the visibility of fields when they are in the detail or in a created header for a field?
I tried using the report's Load event, but this kept giving me errors. Are any of the events in the detail able to allow this?
View 7 Replies
View Related
Jun 18, 2013
I have a main form (Parent) along with a subform(Children). I want to have a button that generates a report with the Parent information as a header and the items in the subform as details. In addition, I want the report to show only the children that were recently added not all of the children.
View 1 Replies
View Related
Nov 22, 2004
I have a report that lists states and cities within the states. When a state name happens to be at the end of the page the individual cities appear on the next page with no State heading. I solved the second page problem by setting the "repeatSection = Yes" in the Section Header (though I haven't shown that in the example below).
But the previous page (which just shows the State Name and no cities looks dumb. Is there some sort of solution.??
(Actually I would also like any State that continues to a next page to not just have the state name but something like
" Colorado (Continued)" Is there anything I can do in VB to make a page break if the section is going to print but therer isn't enough room for one detail line?
This is what I currently see
Alaska
Ancorage
Prudo Bay
California
Whittier
Anaheim
Colorado
------------------------Page Break ---------------------------------
Denver
Pueblo
Colorado Springs
Deleware
Dover
-------------------------------------------------------------------------------------------
Thanks !
View 1 Replies
View Related
Jun 13, 2015
If I have a report and it has controls (labels representing column titles) in the page header. Now when I print the report - if it happens that the last page has no detail records - but there is text boxes and so forth in the report footer. Is there a way to not display the page header on the last page?
I have a report where the last page shows the page header - and the field/column labels on the page header - but for which there is no detail records left to display - on the last page. There is report footer information that should display. It just looks weird because the field/column labels show at the top of the page - but there is no data remaining to print under them on that last page.
View 1 Replies
View Related
Dec 5, 2005
I have a sub Report in the detail section of its parent. I need to hide the detail part of the parent if the subReport corresponding to the record has no data.
Here is what iam trying to do but failing, any ideas...
Private Sub Report_NoData(Cancel As Integer)
Me.Parent.Section(0).Visible = False
End Sub
View 3 Replies
View Related
Nov 16, 2006
Hello!
I have a problem figuring out a solution for following problem.
I have a database of details and their properties.
All the details have been described in one table.
As there is a need to describe groups of details I have found myself in a hard situation that needs to be resolved.
The structure of described detail groups is as follows:
Product
Detail Group1
Detail groupx etc.
Detail4
Detail groupx etc.
Detail groupx etc.
Detail1
Detail2
Detail3
Detail Group2
Detailx
Detailx
Detail groupx etc.
Detail groupx etc.
Is there a way of decribing my products in access so that there are no limits of how many groups does a product have and how many levels of groups the product have.
Thank you
View 1 Replies
View Related
Jun 11, 2007
i'm using Master and Detail table. Master table i have TaskId, ResId where ResId is mapped to Detail table which contains resource working on the task. i want to generate a query where for each task i want to display resource id in single column like below.
Task Id Resource Id
1 222,233,244,255
Do i need to use recursive query or any other method to get results like above.
View 1 Replies
View Related
Jul 11, 2005
I am a novice to Access so bear with me please. I've just created a form to populate some tables.
When I switch from design view to form view, the detail area in the form view is blank. :mad:
The header is fine but fields, which are present in design view are not present in form view.
Any suggestions, I've tried font/background colors and searching for a switch setting.
Thanks in advance,
JA
View 1 Replies
View Related
Jun 2, 2006
I currently use
Me!frmPatientLookupResults.Form.Visible = False
to hide a subform on my form that is in the detail section of my form.
Is there a way to collapse or Hide the Detail section of the main Form??
I notice that their is a property under the Detail section called Visible
with an option for Yes or No.. How would I manipulate that option through
VBA? I am assuming that is the option that I am looking for
View 3 Replies
View Related
Sep 3, 2006
Hi Everyone,
I have a problem here... i need help... could someone know that how to using a combo box to edit the details?
Now i am using the Employee Name as my primary key and i set it as a combo box to let user to select the name and list all the detail like IC, Job Position, Date of Employment and etc. But when i try to edit the detail of the employee, the access program do not allow!! And i know is because i am going to create a duplicate record by the employee name.
So, do someone know how to use the combo box to list out all the details and after i doing editing by pressing a 'Save' button then the detail just change without creating a deplicate record? Maybe someone just give me a little bit idea then is enough... Thank you!!!!
View 3 Replies
View Related
Oct 11, 2006
I haven't used Access in a couple of years. I created a DB some years ago where I did not want the users to be able to view/change the forms, queries, etc.
I only wanted them to be able to view the "finished" product and do the data input.
I remember there was an "alt+key" combination I hit when I opened the db file in order to view/change queries, forms, etc.
Now, I've forgotten the key combination at open which allows me to see the details of the db.
I have some formulaes in that old db that I now need.
Could someone please advise on the key combination at open which will allow me to view/modify the details of the db?
Thank you in advance for your assistance.
Sincerely,
Joel
View 1 Replies
View Related
Jun 4, 2007
I am looking for a way to only print the detail section (no header, no footer) using a print button on a form. it also needs to fit to 1 page. do i need code for this or is there a property that can be adjusted?
View 4 Replies
View Related
Oct 22, 2007
Hello and Good Morning,
I am trying to create a 5 page report filled with colorful tables, charts, and graphs. This report will need to be reproduced 115 times. I am almost finished with page 2 of 5. When I try to start page 3, it appears that the height of the report is capped.
I have reset my computer to clear my RAM, but I still have the same problem. I try extending the length of the report, but the window will not scroll down beyond 22". Is there a way to extend the height of the report?
Thank you in advance, and I will try to answer your question in return.
View 1 Replies
View Related
Nov 29, 2007
Hi,
I'm trying to create a report that separates info depending on Prodno. For now it lists all the right information like this
Code:Product Aisle Rack Shelf0218 7 6 20775 5 6 20775 4 4 40775 0 1 30963 1 1 71000 7 4 61000 2 3 71006 8 8 8
which is fine and dandy. What I would prefer is it do like this
Code:Product Aisle Rack Shelf0218 7 6 20775 5 6 2 4 4 4 0 1 30963 1 1 71000 7 4 6 2 3 71006 8 8 8
I am assuming it is some kind of group by in the details section? Any help would be great,
Thanks,
View 2 Replies
View Related
Jul 20, 2005
I'm curious if anyone know's a way to access a specific data section on a tabular form. I'm attempting to have each section update a specific data item based on its position on the form, but am having problems since I do not know how to differentiate between one details section and another on the form. Any help would be appreciated.
Thanks
View 4 Replies
View Related
Sep 18, 2006
Hi
Got a form with a Detail section that can have any number of textboxes in it depending on the data a query brings back:
e.g.
QueryID Calculatedtextbox
QueryID Calculatedtextbox
QueryID Calculatedtextbox
QueryID Calculatedtextbox
The Calculatedtextbox has a DSum function, which uses the QueryID (another textbox).
I then have a footer at the bottom and need to sum all of the textboxes. Is this possible? Access doesn't seem to like it...
View 7 Replies
View Related
Sep 22, 2004
Dear Moderator and All This forum Member,
i have problem to how to make such a invoice report which in sub report detail have a vertical line per column for each page, and every sub sum in detail can continue for next page,
any one can tell me how? i really appreciate if any one can give me some exampel.
i had looking in microsoft forum for example but i it just for calculating per page which does'nt have sub report and explaining about vertical line in detail.
First of All i want say Thank you for All your Kindness.
Best Regards,
Hendra Susanto
View 4 Replies
View Related
Feb 1, 2005
Hi All,
It's my first post to the forum, but I've browsed it a lot the past week! Lots of info here. Unfortunately I couldn't find an answer to my question, so here it is: A simple Form attached to a Table. In the detail section of the Form the Table rows are displayed (all simple textboxes) and there is a hidden button on the row. When I put the focus on a textbox in a row, I want to set visible=TRUE for the little button in that specific row. Obviously I want the button remain hidden for all other rows!
Is there a way to accomplish this, changing the properties of a control in a specific row? When I set visible=TRUE, all rows suddenly display the button.
Thanks for any input!
View 2 Replies
View Related
Feb 17, 2005
hello. can i refer to a single record in a detail section, and not all of them? for example if i use something like this (after update in field1):
if me.field1 = 0 then
me.field2.enabled = false
any single field1 equal to zero will disable ALL of the field2's. i would like this to work within each record independently.
View 2 Replies
View Related