Forms! Where Am I Going Wrong....
Jan 23, 2008
Hi,
frustration city over here.
for something that reads so simple, i cannot do it. why?
4 tables
Contacts
Authorizations
Payment Numbers
Payments
all tables are 1 to many relationships with referential integrity.
every contact can have many Authorizations
every authorization can have many payment numbers
many payment numbers can have many payments
all payments numbers created are based on the latest Authorization number.
a single payment number will have numerous payments listed.
i have tried forms with qry, forms with tbl, forms with forms, sub forms, sub sub forms. i can get so far but then everything stops linking together. ive tried VB ( barr it i am better with Excel!! ) to open forms, link forms.
story.
1. my main form will show the current contact & all details.
2. i click a button and want to make a payment to them.
3. a form should open and automatically create a new payment number with a subform ready to receive payment details in a continuous form layout. i can then either press an apply button on the main form to save or a cancel button to completely cancel the payment number.
after this, i wanted to add a button on this form to add a new authorization number and refresh but i need to get over this hurdle first.
Please Please Please can someone guide me? the rest of my project is based like this so if i can understand how this can be done, i can move forward to complete.
Any help would be graciously received so i can at least move in a direction rather than circles!!!!!
many thanks,
Nigel
View Replies
ADVERTISEMENT
Dec 6, 2013
I have a table called "Cities" which has only two fields; City & Province.I have connected it in a relationship with another table as "Include ALL records from 'Cities' and only those records from 'tblInstallations' where the joined fields are equal."I have put an "AfterUpdate" event which works and everything.
It is working fine and updates the province correctly.The problem is that is putting another city from same province in the "City" field even though I picked up different name.
View 6 Replies
View Related
Mar 29, 2013
I have a form used for taking inventory. One table to lookup items, one for writing values. Tables linked by an ID #. I created a text box on my form to lookup a value called PARQTY in the lookup table. I need to be able to subtract that value from the QTY that is entered into the Qty_Counted box on teh same form when they take inventory.
I created a new Text box and in the control source for it, I entered an expresion that basically says subtract The PARQTY from the QTY_COUNTED it reads = [QTY_COUNTED] - [PARQTY]
The box is subtracting the QTY_COUNTED from the ID # that is linking my two tables and displaying it. Its not supposed to be subtracting the QTY_COUNTED at all. It should be subtracting the PARQTY value that is displayed from the QTY_COUNTED. The PARQTY box does display the right value from the lookup table so I can't figure out why it's pulling that ID number or where from. The rest of the form / program works and we've been using it for a few years. I also created that, but like now, I had to muddle through each and every little thing I did.
View 9 Replies
View Related
Oct 1, 2013
I have a text box that is displaying a value from a table where the display control for the field in the table is a two row combo box. The text box on my form (I'm droping the text box on the form and manually changing the control source) is displaying the second column of the combobox where as I want the first column. If I drag the combobox from the field list onto the form it does show the expected first column (now if i change this to a text box in properties it shows the second column as well). Is there a way to change the text box to view the first column?
View 2 Replies
View Related
May 3, 2013
I have a form with a TAB control and four pages. Each control of each page has his TAB index set correctly (starting from 0 to n), some of controls are not enabled to be tabbed. The form's cycle is set on "Current page".
I have two kind of problems.
First: I am on the last control of the page, pressing TAB key the focus gets invisible. Press TAB key again and the focus moves on the first page's control. For each page happens this behaviour.
Second: clicking randomly on the TAB pages the focus is not always on the control with TAB index 0, but usually on the last.
I have read that clicking on a new page the focus should be automatically on the first control, but this does not happen in my experience.
View 9 Replies
View Related
Jul 31, 2015
So I created a search form which filters my results. Apparently I don't have enough posts to link to the source of the code though. The code is from this website, /forums/showthread.php?t=188663
I then wanted to allow users to double click a result in the listbox to take them to the form which contains details about that record, however the listbox doesn't point to the correct record.
-When nothing is specified in the search field, all records are shown in the listbox, but double clicking on the first record takes me to a form that has no information. Clicking the second record takes me to the Detail Form of the first record.
-When information is put into the search field, the results are filtered and only a few display, however clicking the first result again takes me to a blank form while the second result takes me to the first record of the unfiltered list. There is no way to reach the Detail Form for the last result of the listbox.
-I tried right clicking the results in the listbox and copy pasting the information. The first result gave me a "0", the second a "1", and so on and so forth. This was the same whether or not the information was filtered or not.
-I tried switching to a combo box and got the same results.
View 2 Replies
View Related
Jun 11, 2014
I have an unbound combo box that I set up in a form using the combo box wizard in Access 2010. I selected the option that says, "Find a record on my form based on the value I selected in my combo box." The problem is that the combo box will not always display the correct record. It seems to only display the first record of a group of similarly named records in a table.
Example:
Code:
Last Name First Name SSN
Smith Alex 123-45-6789
Smith Jane 234-56-7891
Smith Mary 345-67-8910
If I select Smith Jane, the record for Smith Alex will display. I know that this has something to do with the bound column property, but I am unsure what to do to fix the issue.
What I have tried: I tried setting the primary key as the first field, but then I could only search by the primary key, which is unrealistic for this database. Users will be searching based on last name. How do I make the combo box select whichever record I select from the drop down list?
View 4 Replies
View Related
Sep 21, 2005
Ok Guys,
Here goes...
all of a sudden now, when i open my form, its not displaying any of the previous data that i stored in it!! All the data is still in the table, and when i add data it goes into the table!! I checked properties and the record source and everything is ok there, what have i done wrong guys...HELP!!!!
View 3 Replies
View Related
Jun 9, 2006
I purchased a copy of Office 2003, on Ebay, for less than half the price it normally sells for. I created databases, which work well on my computer. However, when I copy them over to the office computer from my computer, via Flash memory stick, the program does not run. The message seems to indicate a problem with registration. When I installed Access, it asked me for a registration key, which I did provide. After that it worked-not activation process. Does this mean that you can only use the computer you created the database on to run it, or that I do not have a proper version of Access 2003? I cannot transfer, from my home computer, to the office computer. Is this Microsoft paranoia again?
Subsequent uninstalls and reinstalls of the program did not ask for the installation key.
What should happen? I would like to resolve this major problem and your help will be greatly appreciated. The program is flaky. Also, Switchboard does not work-must use Option Box.
These questions most user must know about initial installation and copying mdb files to other computers -please reply.
View 2 Replies
View Related
Oct 16, 2006
Hi,
Can anyone tell me what's wrong with this:
DoCmd.RunSQL "INSERT INTO tblPersoaneJuridice (Denumire,Localitate,CodUnicInregistrare,NumarInre gistrareRegComertului,Telefon,Fax) VALUES ('" & Forms!frmPrincipal!subfrmTipVersus!txtDenumire & "','" & Forms!frmPrincipal!subfrmTipVersus!txtLocalitate & "','" & Forms!frmPrincipal!subfrmTipVersus!txtCUI & "','" & Forms!frmPrincipal!subfrmTipVersus!txtNumarInregis trare & "','" & Forms!frmPrincipal!subfrmTipVersus!txtTelefon & "','" & Forms!frmPrincipal!subfrmTipVersus!txtFax & "')"
cui = DLookup("[CodUnicInregistrare]", "[tblPersoaneJuridice]", "[NumarInregistrareRegComertului]='" & Me!subfrmTipVersus!txtNumarInregistrare & "'")
i have a string variable denoted by cui and i need it to take value from table tblPersoaneJuridice from field CodUnicInregistrare. CodUnicInregistrare and NumarInregistrareRegComertului is text.
View 3 Replies
View Related
Jun 14, 2007
Have not coded for about 5 years and need a little refresher. Can't remember what I need to do. Thanks
Dim SelectedCompany As String
Dim rs As ADODB.Recordset
Dim Cn As ADODB.Connection
Dim sSql As String
Set rs = New ADODB.Recordset
Set Cn = New ADODB.Connection
SelectedCompany = Me!cboCompanyName.Text
sSql = "select Customername, AddressLine1, AddressLine2, AddressLine3, AddressLine4, AddressLine5, AddressLine6 from customers where "
sSql = sSql & "CompanyName = '" & SelectedCompany & "'"
rs.Open sSql, Cn, adOpenStatic, adLockReadOnly
this last line fails with error "No value given for one or more required parameters."
The code is executed when someone selects something in a combo box on a form in an access database.
Thanks
Pete
View 4 Replies
View Related
Oct 4, 2007
I think I'm just tired, and not seeing what to do here.
I have my main table.
MainID PK
bunch of other fields...
I also have a 'created by table'.
Createdby_ID PK
User ID
Main ID
Date_created.
I also have a user table, with a list of all the users.
User_ID PK
User_Name.
Is this the right way to setup these tables?
Only 1 person can create any paticular record.
I want it to be required tha whoever creates the record selects their name and dates it.
View 11 Replies
View Related
Dec 13, 2005
strSQL = ("SELECT onespace2(MeetingMinutes!MinutesID, '.' ) & " - " & [MinutesTitle] AS Item, MeetingMinutes.MeetingCode, Minutes.*, MeetingMinutes.MinutesCode, MeetingMinutes.MinutesID ")
strSQL = strSQL & ("FROM Minutes INNER JOIN MeetingMinutes ON Minutes.MinutesCode = MeetingMinutes.MinutesCode ")
strSQL = strSQL & "WHERE MeetingMinutes.MinutesCode= " & MinutesCode & " AND MeetingMinutes.MeetingCode= " & [Forms]![MinutesMFnew]![ComboMeetingNav] & ";"
cant get it running.
i got the same query running made in the querybuilder, but somethings change, so i need to adjus it in vba. But it doenswork, and get a type error
please advice
View 1 Replies
View Related
Jul 13, 2007
DoCmd.RunSQL "INSERT INTO tblAccessLog " _
& "(DateLoggedOut, TimeLoggedOut) VALUES " _
& "(#" & Date & "#,#" & Time & "#) WHERE " _
& "(LogID = '" & LogsID & "');"
Could anyone possibly tell me why this isn't working? Probably something stupid i've done bus still.
When i run it, I am getting the error message "Query input must contain at least one table or query" yet i've told it to use tblAccessLog so i'm just confused.
Thanks
View 8 Replies
View Related
Aug 14, 2007
StrSQL = "INSERT INTO LV (Directory_Name:,Filename:, Total_Files,Total_Records:,Total_Batches:, Total_YH) VALUES ('" & DirectoryName & "', '" & FileName & "', TotalFiles , TotalRecords , TotalBatches , TotalYH);"
Have tried loads of combinations of the " ' and ' " to get it working but just keeps giving me the damn syntax error!!! :mad:
What's wrong with it? Thanks
View 2 Replies
View Related
Oct 11, 2007
strSQL = "INSERT INTO TBL_History (Filename, Agent, SentRecieved, Accepted, Notes) VALUES ('" & [Forms]!FRM_ImportSubmission.submission_filename & "','" & [Forms]![FRM_ImportSubmission]![cboAgent] & "','Recieved','True','');"
CurrentProject.Connection.Execute strSQL
i've posted it as the sql string is built in the code
i get a 'catastrpohic error' when running it from vb like this and when i build put the string into a query and run it through the access user interface it worrks
View 14 Replies
View Related
Oct 23, 2007
I made a number of changes to a DB that was working fine (normalised further). So what's wrong? I have a number of forms (for my sample DB I have stripped down to just one, if I can resolve for this I can apply to others).
qryENTRY_COMPUTERS
ENTRY COMPUTER FORM
The user adds a new computer then selects the Computer Make (qryLOOKUP_COMPUTER_SUPPLIER) & Computer Model (qryLOOKUP_COMPUTER_MODELS).
This now returns error 'recordset is not updateable'.
The query on which the form is based is incorrect (qryENTRY_COMPUTERS). Previously I was able to add tblSupplier & tblSupplierProducts to the query then add field ProductDescription fom tblSupplierProducts to the query. This allows users to select a value from cboComputerModelID (ProductID), field ProductDescription then displays the related descriptive value for the ProductID selected (value remain on screen when user naviagtes between records.
I have attached a sample database (access 2002-2003 format).
I am sure the answer is staring me in the face but I have now spent hours trying to resolve!!
Help very much appreciated.
Phil.
Update: One difference I can see is that on the query 'qryENTRY_COMPUTERS' where i have added tblSupplierProducts & tblSupplier the join properties are in reverse i.e. Left Table Name = tblSupplierProducts Rigth Table Name = tblComputers Left Column Name = ProductID Right Column Name = ProductID ????
I can't edit this.......................
View 14 Replies
View Related
May 6, 2005
i cant seem to get this to work.
any help would be greatly Appreciated
=sum(iif([SADate]>=DateSerial(Year(Date()),Month(Date()),[p]))
thanks in advance
View 3 Replies
View Related
Jul 20, 2005
I am trying to create a form that has an unbound text box which row source is a field in a table. I have created a subform that gets the records from another table.
Both tables are linked in a one to many relationship. When a user selects a record in the cmbo box i want the table to show only those records which are related.
This obviously didnt happen. So i changed the subform instead of a table as its source but a query, then in the criteria of a query just set it to look at the cmbo on the form. After the cmbo was updated i got the subform to requery.
This worked fine, but i was unable to make any changes or updates but with no particular error.
When inserting a subform using the wizard i do remember coming across a section of a wizard that asks me if i would like to tie in the subform with something on the form. However this part of the wizard just doesnt show. Maybe i was using a different version of access for this wizard?? i am currently using Access XP.
Am i really going MAD!!?
View 3 Replies
View Related
Aug 30, 2005
I'm trying to mess with a combo box where when one user selects a value a form opens up. This is the code I'm typing in but I keep getting a syntax error
DoCmd.OpenForm(Phone,[View As AcFormView=acNormal],[DataMode As AcFormOpenDataMode=acFormAdd],[WindowMode As AcWindowMode = acWindowNormal],[OpenArgs])
View 5 Replies
View Related
Aug 15, 2006
Hi,
Trying to make the selection in a combo box on frm1 be the filter on frm2.
I found this example by searching the form, but it's not working for me
Option Compare Database
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "form_lastnametotal_exludeholidayform"
stLinkCriteria = "[Employee_Name]=" & Me!cboMyCombo
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
I get an 'the openform action was canceled' error?
Any ideas?
The second form is based on a query
Thanks
View 10 Replies
View Related
Sep 26, 2006
Hello once again. I have been working on a small database that records all IT records (Desk Info / Software / License Info / Hardware etc...) Somebody out there might even find it useful!! Will post to DB forum when working :)
Where to begin. I thought it would be a good idea to normalize a little more........(still not 100% but an improvement). I seperated Software/License information. I now have tblSoftware & a tblLicenseDetails.
Basically the clux of it all centers around a form 'frmDeskSetup'. You can search via three methods (Desk ID / User ID or Computer ID). I would like to amend the Installed Software Form (last form on frmDeskSetup) to include the License Information.
I have also tried to create a query linking tblComputerSoftware tblSoftware + tblLicenseDetails. My idea was to create a form that would allow users to Add Software/ Add a License for that Software and then allocate the licensed software to a computer all from one form. The query run OK but would not allow data entry via the form!!
Sorry for the length of this post. I have attached a stripped DB for forum in Acess 2003 format.
Thanks in advance,
Phil.
View 5 Replies
View Related
Sep 3, 2004
IIf([Count: ERName]>=5,"Yes","No")
What is wrong with this line? I am entering it in the following query:
ERName Group By
Department Group By
Date of Call-In Group By
Type of Call-In Group By
Count:ERName Count
The other thing I tried is just doing another query based on the above query and doing a totals (sum) line on Count:ERName. That doesn't work, it prompts me for count (as if that is a parameter I want to choose.
Any ideas? Sorry to be a pain. Thanks!
KellyJo
View 1 Replies
View Related
Dec 13, 2004
Hello,
I am still learning access- I am hopeful someone does not mind helping me...no matter how easy or simple this may be. I will do my best to describe what I am trying to do.
I am creating a system admin database- starting from scratch and am willing to start over.
I would like to create 2 forms that work directly with the appropriate tables.
Table 1 (host/IP):
Hostname
IP address
User - uses a drop down already created
System - uses a drop down already created
Table 2 (system updates):
Action- uses a drop down including install, remove, etc...
Software- uses a drop down to select from including virus, system updates
Date updated
Comments
Form 1:
-new record button (to enter new hostname record and IP associated)
-find button
-save button
-Exit (database button)
-Delete Record button)
-hostname
-IP address
-user (drop down to change user if necessary)
-System (drop down to select laptop, workstation, etc.)
-"Add/update patch" button (which I would like to link to form 2 showing
only the records for the selected host/IP on form 1)
- "view all updates for this system" button (within last week or month)
Form 2:
- Clear or undo button (which will undo any field entered by mistake on this
form)
- Save button
- Exit (to main form) button
- Hostname field which matches what is on form 1
- user field which also matches what is on form 1
- Next, there are four separate lines (as seen below)- each with the
appropriate links to table 2. The purpose of the four lines is if the admin has
four separate updates to be entered, they can do it on one page, click
save and each separate will be saved and accociated with that hostname,
IP.
1. Action - Software - Date Updated - Comments
2. Action - Software - Date Updated - Comments
3. Action - Software - Date Updated - Comments
4. Action - Software - Date Updated - Comments
- System Admin field - this is to show who did the updates for the selected
hostname/IP
Now, I seem to be okay with form #1 (except the "view all updates..." button)
Form #2 is giving me a fit. I seem to be having problems populating all the hostname records that have been entered. Also, the four lines are not working independently.
Is it possible to have the date update field automatically update when action or software is updated/selected.
Perhaps I have the second form set up wrong due to the relationships or primary keys or I just did not configure the form correctly.
Sorry for the long message- I hope someone can help straighten me and/or this database out.
Thanks in advance,
stillabeginr
View 4 Replies
View Related
Jun 9, 2006
I purchased a copy of Office 2003, on Ebay, for less than half the price it normally sells for. I created databases, which work well on my computer. However, when I copy them over to the office computer from my computer, via Flash memory stick, the program does not run. The message seems to indicate a problem with registration. When I first installed Access, it asked me for a registration key, which I did provide. After that it worked-no activation process. Does this mean that you can only use the computer you created the database on to run it, or that I do not have a proper version of Access 2003? I cannot transfer, from my home computer, to the office computer. Is this Microsoft paranoia again?
Subsequent uninstalls and reinstalls of the program did not ask for the installation key.
What should happen? I would like to resolve this major problem and your help will be greatly appreciated. The program is unreliable. Also, Switchboard does not work-must use option box instead.
View 2 Replies
View Related
Sep 28, 2007
Where am I going wrong here? I want to find then add if not found to this form. But the apply errors with err 3075. Any ideas???
NB Iam a first poster is this an OK question for here?, or should i have put it somewhere else
VBA Code part...
'Find or create the message
DoCmd.OpenForm "frmMessage", acNormal, "", "", acEdit, acNormal 'Open the
message form.
'this goes wrong because strEvent is passed and not it's contents I think!.
DoCmd.ApplyFilter "", "[Forms]![frmMessage]![Message] = strEvent 'Apply a
filter to find the current message."
Any constructive help appreciated. thanks.
View 4 Replies
View Related