Simple Form Question, But Having Trouble
Jul 11, 2006
I have a form, where the users choose a name from a pull down box and enter the date and other information. The pull down box has more than 100 names. The information such as the name, date, etc. gets stored into a table. It is fine if a certain name appears more than once on the table. I want to create some code, where if I click a button, it counts how many times each name appears in the table and outputs this information. I want the output to have the name in one column and the number of times it appears in the second column. Any ideas on how I could do this. I am very new at access and VB. I would appreciate your help. Thank you. (Basically I want to see how many times each name has filled out the form)
For example,
smith 3
doe 4
bell 8
View Replies
ADVERTISEMENT
Apr 12, 2006
I am trying to use dlookup to fill an unbound textbox on my form. I know I am doing a simple thing wrong and I cant figure out what it is.
My form has a field from table(m5Warehouse) called M5Location. It is a bin location. My form has an unbound textbox called BinMax.
I have a table called tblbinmax that has 2 columns. Binnumber(same as m5location) and binmax(maxinum number of pallets that can be placed in bin)
When i fill in M5location on my form, I wanted code to fire on afterupdate to look in tblbinmax, look at the binnumber and put in the value in unbound textbox called BinMax.
This is my code: me.binmax.Value = DLookup("[binmax]", "tblbinmax", "[binnumber] =" & Me.M5Location)
I have tried every way i can figure to make this work, and i keep getting error message, name?#, etc. I get error msg 3075 and error msg 2001...PLEASE HELP!!
View 2 Replies
View Related
Sep 6, 2006
Hi
i currently have a simple spreadsheet in Excel containgin the following fields.
## Date - not unique
simpy shows the date of the transaction
## Debt - who the debt will be paid to - unique per date (e.g. CompanyA)
## Type of debt - what service is it - not unique by date or debtor (e.g. Wages)
## Net Price before VAT (X)
## VAT (value added tax, a UK tax) (Y)
## Price of Service (Z = X+Y)
## Running total of Net Price before VAT (X + X + X...)
## Running total of VAT (Y + Y + Y...)
##Balance - (Z + Z + Z...)
The spreadsheet currently calculates this automatically using simple formulas.
I'd like to create a nice little interface for this data entry using MS access forms. From then I can easily create queries and reports etc.
can somebody please help me out! :D I've tried to list my entities and create an ERD to no avail!
Many Thanks
Mike
View 7 Replies
View Related
Aug 23, 2006
Hi All, Thanks in advance for any suggestions :)
Okay Im trying to create a form with a text box that has a Date/Time format applied to it. I also want it to default to TBD (to be determined) but it wont allow me to have text as default because of the date format. So I have a label floating overtop of it with TBD as the caption. So i want to write code that will show the Label in the form until you click on it, then it will show the text box underneath, hiding the label, and the user can input a date. I also am trying to figure how to have TBD be visible again if the user deletes the date in the text. this is what i have so far and some of it is working...thanks to anyone who can help
With CurrentForm
!txtEditModeChange.Requery
If .Name = "SYS_HOPCoverPage" Then
If !PlannedInService.Value = Null Then
!PlannedLabel.Visible = True
!PlannedInService.TabStop = False
Else
!PlannedInService.Value = Not Null
!PlannedLabel.Visible = False
!PlannedInService.TabStop = True
End If
End If
End With
View 3 Replies
View Related
Mar 23, 2005
Ok I know that I am missing something stupid but i've been staring at it for so long I can not figure out what it is.
I have a query to show run leaders in decending order and when I run the query from the query design view it works perfectly however when I open the form that is based on that query it is not sorting the runs in decending order but sorting the players by alpha name. Every other report in my program works fine except this one...BLAAAAAAH what the heck is the problem?
View 1 Replies
View Related
Jul 13, 2007
I have 3 tables. Two of them are linked in a one to many relationship to a reference table. I am trying to create a form that populates data in the two forms that are connected to the reference table. Is this possible?
View 1 Replies
View Related
Apr 4, 2005
I am going to retype this as perhaps my original explanation was too wordy.
I need to display data from 2 tables in a continuous form. Sure I can do this with a query and a join, but the user needs to be able to add records to the form as well. When adding a new record, only one field need be entered (actually selected from a combo box) and the other 2 fields would auto-fill based on the selection.
Is this even possible?
View 5 Replies
View Related
May 10, 2006
I created lots of controls on my form, and now i cannot create anymore. I do not know what the problem is... I just get an error message that says:
"MS Office Access cannot create any more controls in your form/report. If you have deleted controls from this form/report in the past, try renaming the form/report and then add more controls to it"
I tried renaming the form already. it didnt work :confused:
I tried to create a new database (i copied all the tables, queries and forms into the new database). it didnt work.
I dont know what else to do... Please help
I would dearly appreciate any help. Thank you in advance :)
View 2 Replies
View Related
Feb 10, 2006
I have a query called VOLTEST that is not bound to the form. VOLTEST sums a field in a table from a subform. When the input is finished in the subform and control goes back to the main form, I want the total from the VOLTEST to show in a field on the form that is not a tab stop. Basically, this is just for reference.
I have tried to put =[VOLTEST]![SumOftest_value] in the control source of the field on the form but I keep getting "Name?" as the result instead of the sum total.
I can run the query in the gotfocus of the first field in the tab order after the subform and I get the correct result in a datasheet view. So, I know the query is working correctly. I just need it to show the result in field on the form.
Thanks for your help. GG
View 2 Replies
View Related
Jun 20, 2005
I have a form to edit records. When I open the form I am not able to change any of the fields until I edit a date field that has a calendar popup on the "on click" event. After that all of the fields are available for editing. Any ideas??
Thanks,
Pat
View 11 Replies
View Related
Aug 28, 2005
Hi Gents,
I copied my mdb from one pc to another. Both pc has Access 2003 ver.
But when I try to open one of the form it gives error. The error has been attached in a Jpeg file. But when the same form runs from previous pc, it runs smoothly.
Kindly let me know why this occures and what is the solution to get rid of this.
Any help would be appreciated.
With kind regards,
Ashfaque
.
View 2 Replies
View Related
Aug 31, 2005
I'm having a problem with a form/subform. The table I'm using includes the fields: date, personnelID, status, comments. The main form has a single field, date. The subform has the fields date, personnelID, status, comments. I have the form/subform linked using the Date field, because there are multiple instances of the same date in the table, I have to keep clicking the navigation buttons on the main form to go through all the duplicate dates to get to the next one. Is there a way I can filter the Date field on the Main form to only show one copy of each date? I had thought about creating a new table with only a date field and no duplicates, then just append all dates from the main table to this one and use it to go through the dates, however I'd rather not have to make an extra table just for this. This is basically for personnel accountability, I want to be able to select a date on the main form and display the "daily status"(present, on leave) for each person in the subform.
Even better would be if I could create a next and previous button to switch the date on the main form(I know how to do this.) but how would I get the subform to update the records to the date on the main form and keep it from going to dates that don't exist?
View 1 Replies
View Related
Aug 17, 2006
Dear access experts,
I created form based on a query of around 7 tables, all the fields are set to
enabled and edits are allowed; however, access wont allow me to edit any of
the fields in that form! I know that the query is correct because i can flick
through the records and the fileds change.. please help:eek:
View 2 Replies
View Related
May 6, 2005
I'm trying to use code from a project that came with an Access book. However, I can't get it to execute, because I can't get it to compile.
Could someone PLEASE help me out?
Private Sub Search_Click()
gstrWherePhys = ""
If Not IsNothing(Me!LastName) Then
gstrWherePhys = "[LastName] Like " & Chr$(34) & Me!LastName
If Right$(Me!LastName, 1) = "*" Then
gstrWherePhys = gstrWherePhys & Chr$(34)
Else
gstrWherePhys = gstrWherePhys & "*" & Chr$(34)
End If
End If
If Not IsNothing(Me!FirstName) Then
If IsNothing(gstrWherePhys) Then
gstrWherePhys = "[FirstName] Like " & Chr$(34) & Me!FirstName
Else
gstrWherePhys = gstrWherePhys & " AND [FirstName] Like " & Chr$(34) & Me!FirstName
End If
If Right$(Me!FirstName, 1) = "*" Then
gstrWherePhys = gstrWherePhys & Chr$(34)
Else
gstrWherePhys = gstrWherePhys & "*" & Chr$(34)
End If
End If
If Not IsNothing(Me!City) Then
If IsNothing(gstrWherePhys) Then
gstrWherePhys = "[City] Like " & Chr$(34) & Me!City
Else
gstrWherePhys = gstrWherePhys & " AND [City] Like " & Chr$(34) & Me!City
End If
If Right$(Me!City, 1) = "*" Then
gstrWherePhys = gstrWherePhys & Chr$(34)
Else
gstrWherePhys = gstrWherePhys & "*" & Chr$(34)
End If
End If
If Not IsNothing(Me!Facility) Then
If IsNothing(gstrWhereCust) Then
gstrWherePhys = "[Facility] Like " & Chr$(34) & Me!State
Else
gstrWherePhys = gstrWherePhys & " AND [Facility] Like " & Chr$(34) & Me!State
End If
If Right$(Me!Facility, 1) = "*" Then
gstrWherePhys = gstrWherePhys & Chr$(34)
Else
gstrWherePhys = gstrWherePhys & "*" & Chr$(34)
End If
End If
If Not IsNothing(Me!State) Then
If IsNothing(gstrWherePhys) Then
gstrWherePhys = "[State] Like " & Chr$(34) & Me!State
Else
gstrWherePhys = gstrWherePhys & " AND [State] Like " & Chr$(34) & Me!State
End If
If Right$(Me!State, 1) = "*" Then
gstrWherePhys = gstrWherePhys & Chr$(34)
Else
gstrWherePhys = gstrWherePhys & "*" & Chr$(34)
End If
End If
If IsNothing(gstrWhereCust) Then
MsgBox "No criteria specified."
Exit Sub
End If
Me.Visible = False
DoCmd.Hourglass True
If IsLoaded("PhysicianDB")
Forms!PhysicianDB.SetFocus
DoCmd.ApplyFilter , gstrWherePhys
If Forms!PhysicianDB.RecordsetClone.RecordCount = 0 Then
DoCmd.Hourglass False
MsgBox "No Customers meet your criteria"
Me.Visible = True
Exit Sub
End If
Else
DoCmd.Hourglass True
DoCmd.OpenForm FormName:="PhysicianDB", WhereCondition:=gstrWherePhys, _
WindowMode:=acHidden
If Forms!PhysicianDB.RecordsetClone.RecordCount = 0 Then
DoCmd.Hourglass False
MsgBox "No Customers meet your criteria"
DoCmd.Close acForm, "PhysicianDB"
Me.Visible = True
Exit Sub
End If
DoCmd.Hourglass False
End If
DoCmd.Close acForm, Me.Name
End Sub
View 12 Replies
View Related
Nov 2, 2005
I have a continuous form reflecting events. The notes field is too large and so has to be it's own form. I made a button that is supposed to open the notes for the record. But it doesn't matter which record I'm on, it clicking the button always brings up the same note - it doesn't link the criteria and open only the correct record in the notes form. Is this because it's a continuos form? How can I fix this?
View 8 Replies
View Related
Jul 6, 2006
Sorry this is so long but I am trying to make it as detailed as possible...
The Setup
My database is similar to the sample "Service Call" db. I have a main table called "tblTT" which has an autonumber primary key. The table also contains several foreign keys such as UserID (not an autonumber) from "tblUser", TechID (also not an autonumber) from "tblTech", etc. I have the relationships setup with "Enforced Referential Integrity" for both updating and deleting records. Each relationship has a RIGHT OUTER JOIN ("Join 3" in access) so that all records from child (tblTT) and only equal from parent (tblUser, tblTech, etc.) will be included. I have a form for nearly every table which serves different purposes but the main function of the DB is to create new Trouble Tickets (TT's), a.k.a. service calls. Therefore the main form used is my "frmTT" form in add mode. The form contains all the fields from my "tblTT" table and contains (directly) no fields from any other table (I guess indirectly it contains fields from all the parent tables...).
The Problem
When I pull up "frmTT" and try to create a new Trouble Ticket for a user that does not yet exist in the table "tblUser" I get the error "You cannot add or change a record bcause a related record is required in table 'tblUser'".
What I want is for my users (the "Techs") to be able to create a new Trouble Ticket without having to worry about populating the "tblUser" table (and other parent tables) first.
My Solution
I was going to (and unless someone can find an answer for me still will) fix this using VB script by setting up a query to check all the parent tables for the values in their corresponding fields in the form. If the query returns no results an "INSERT INTO" statement will run to populate the parents tables so that the form will save itself into the Trouble Ticket table ("tblTT").
I feel that this is a huge work around and not the proper fix. I would prefer to do this the right way both to have a correctly setup DB and for future reference. Can anyone help me with this?
Thanks,
Andy
View 3 Replies
View Related
Oct 26, 2005
hey,
i have a form that keeps a record of my telephone enquieries at work..
i want to place a button on this form so that, whenever i have successfully dealt with a call, i can click this button and the record will go to a NEW "Logged Calls" form...
how can i achieve this?
p.s i am very new to programming etc...
thanks in advance!
johnny
View 13 Replies
View Related
Jun 27, 2005
When user submits record on form, by pushing the arrow to move forward to new form, or back to previous ones, I would like to ensure that they have met a specific criteria in some fields.
How can I catch this without using VB Access? I can use VB Access, but would like to know how "normal" users would force form validation.
Much appreciation for lesson.
-Mike
View 3 Replies
View Related
Sep 15, 2005
Hello
Im sure is is a simple problem but its driving me mad,
I have a form with 2 sub forms in it which are tabbed across the top of the form. When I open the form it displays everything fine accept it cuts off the two tabs at the top of the form and I have to use the the side scroll bar to view them. Small problem but not for people new to the database as they wont know they are there.
Thanks in advance
Daz
View 1 Replies
View Related
Mar 5, 2006
Private Sub btnConfirm_Click()
On Error Resume Next
DoCmd.Close acForm, Me.Name
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim password As String
password = "closeme"
If enterpassword <> password Then
Cancel = -1
MsgBox "Incorrect password!", vbExclamation
End If
End Sub
It works except if I press the confirm button with no text entered into the box it'll act as if the password is correct, wheres the simple error?
View 6 Replies
View Related
Dec 12, 2006
I have a table that contains a pricing list of two columns, one with the name and the other with the price, i have locked the name so it can not be changed therefore only letting the user change the price. Is there any way that you also stop the user sdding any more records to the form and therefore the table??
Thanks in advance...
View 1 Replies
View Related
Nov 23, 2004
This is probably v. simple but is doin me head in.
I've got a form based on a query containing three figures (currency). I want a total box that will add the 3 up. On the query I've created a field called Total with the following:
Total:sum([Text1]+[Text2]+Text3])
When three figures are in it works fine. If one of the figures is not there it displays #Name. I could get the fields in the table to automatically display 0, but if a user deletes off the 0 I'm stuffed.
Where am I going wrong?
Recall.
View 1 Replies
View Related
Jan 29, 2005
I am trying to create a form with close to 30 fields to be entered.
There are several fields that I would like to use a combo box for drop down options.
The key to this is to force people filling out the forms to select a valid entry.
My questions are:
1. With the Combo Box, how do I enter my selected information.
2. How do I point the information in my form to a new table so all of the information in the form can be stored in one centralized location.
Derrick
View 1 Replies
View Related
Apr 21, 2006
:mad: it sound really stupid but I am having problems on open.
I have a main input page for the database I am creating but when I open it up it brings up previously inputted data.
Any ideas on this?
View 2 Replies
View Related
Oct 5, 2006
I have a table filled with computer monitor information (tblMonitorManagement). I had query that uses combo boxes (cboSerialNo, cboRoom, cboDepartment) on a form for search parameters. The query is called qryMonitorManagement_Sub. The results are displayed in a subform (frmMonitorManagement_Sub). This works for both my desktop and also my laptop based forms/queries/tables.
Although this form works when using cboRoom and cboDepartment, it does not work when using cboSerialNo, so I decided to simplify it down to get to the root of the problem...here's what I did.
I created a new form, created a combo box (again called cboSerialNo), and had it look up the serial numbers in tblMonitors. Simple.
I created a query called qryMonitors_Test, added all fields from tblMonitors (not using the * option). I then set the SerialNo field criteria to the contents of the cboSerialNo on the new form. Simple. For now I'm ignoring searching on anything else.
I ran the query with no search parameters before I added the criteria, and it obviously displayed all the records in tblMonitors. Fine.
After adding the criteria (using Build...to prevent typos), I used the form to select a serial number, run the query and get no results returned.
If I copy and paste the same serial number and change the SerialNo criteria in the query to search for that it works fine. As soon as I tell it to search for the combo box contents it returns no data.
This is driving me completely bat-poo. It's nothing I've not done a squillion time before but it just refuses to work. I've got to assume it's a query issue as opposed to a form issue, but things don't get much simpler than this should be!
View 6 Replies
View Related
May 5, 2005
i have created a form based on a query and basically the form comes up as a whole page spread and i would like it to just come up as a small form instead of a whole page. i think i go into properties and then choose the actual form but i just need to know how to make it so its small.
Hope this explanation is adequate
Thanks
Nicholas
View 2 Replies
View Related