Sub Form Not Working?
Mar 11, 2005
Guys I have just been asked to take a look at an old DB that I did ages ago.
The problem relates to the Suppliers Form. It has a SubForm SupplierContacts.
The user can enter a supplier contact name for the supplier account being viewed. If they navigate away from the record and then back the Supplier Contact form is blank? I can't see why this is happening. Been playing around for a while now but still can't see it?
Master / Child Link is OK: SupplierID to SupplierID
The record exists within the main table (tblSupplierContacts)
Any ideas?
Cheers,
Phil.
View Replies
ADVERTISEMENT
Jan 15, 2015
I have an Access 2010 database with two tables and two forms. The tables are Organizations and People. Similarly, the forms are Organizations Entry Form and PeopleEntryForm. The People are linked to the Organizations table. Several people can be linked to the same organization.On my Organizations EntryForm, I created a command button to duplicate a record using the wizard. It works fine.
I did exactly the same thing on the PeopleEntryForm, but instead of copying the record, it creates a new blank record. I don't get any error messages. Is my problem due to the fact that the People table is linked to the Organizations table?
View 13 Replies
View Related
Jan 18, 2006
Hi,
I have a sub form (courses). which isn't displaying the information that i have previously entered into it for a particular record.
i.e. I have an appointments system where the my main form 'Tutors' links to a 'courses' sub form. I can enter info into the courses form through the tutors form but when i close it and then reopen at a later time the information for courses isn't displayed for the record which i had previously entered it for. (it is in the courses table though, i've checked).
Any help would be much appreciated.:confused:
Jonathan
View 1 Replies
View Related
Apr 11, 2006
I am having a problem when trying to use the Form Wizard.
I select a table or query, but it shows no fields! Here is a screenshot:
http://img.photobucket.com/albums/v85/retroap/access.jpg
I am running Office 2003 with the latest updates on XP Professional SP2, again with the latest updates. The install was fresh only about a week ago, and I had only used this install of Access for a few hours before it started doing it!
I have tried creating a totally new database, or using an existing database, and the same happens. This led me to believe it was my Office install. I tried doing a repair through add/remove programs, which successfully repaired Office apparently, yet the problem persists. I even totally removed Office, rebooted, and reinstalled, and tried without updates!
Can anyone suggest what I could try next?
View 5 Replies
View Related
Aug 1, 2005
Maybe this should be posted under VBA.... not sure. Havent seen answer that works yet.
Its a form with an option group "PickWO" When you pick an option, different fieilds become visible-non visible. I created a field "PickWOvalue" to store the option value "1" or "2". That part works fine.(visible) The problem is when you reopen the form to view the records the option box value does not show or change the fields visible properties. And the on open cuauses an error. Anyone see the problem?
Private Sub Form_Open(Cancel As Integer)
Me.PickWOvalue.Value = Me.PickWO.Value
End Sub
`````````````````````````````````````
Private Sub PickWO_AfterUpdate()
Call NotVisible
Select Case Me.PickWO
Case Is = 1
Me.ReInspectionDate.Visible = True
Me.Price.Visible = False
Me.WOPreview.Visible = True
Me.PrtWO.Visible = True
Me.WBMInvoice_.Visible = False
Case Is = 2
Me.ReInspectionDate.Visible = False
Me.Price.Visible = True
Me.cmdPreTag.Visible = True
Me.cmdPrtTag.Visible = True
Me.WBMInvoice_.Visible = True
End Select
End Sub
View 6 Replies
View Related
Aug 30, 2006
Hi group, I am a newbie to Access and VBA programming. My original post was probably not very specific as it was not answered but I really need help on this!
TABLE1 stores a list of serial numbers and a status field (it contains the word Pass or Fail). The NEWSN table is used to capture new input of serial numbers and a field to indicate if the serial number exists in the first table.
The query based continuous form used to enter the new serial number. Upon entry of the new serial number the form requeries to find the match. If a match is found the remaining fields on the form populate correctly. If no match is found the form does not show the input of this serial number, but it does write the new serial number to the NEWSN table.
How can I get it to keep the new serial number showing on the continuous form and insert a statement into the NEWSN table indicating "No Match"?
Any help would be greatly appreciated!
Thanks,
Kerry
View 3 Replies
View Related
May 8, 2005
Hi- I am trying to create a Registration form for Events and I'm having endless trouble getting it to work.
Basically, I have four tables: Contacts, Registration, Payments, and Events.
I either cannot delete registrations when I need to-I delete a record in the form, but when I reopen it it is there again; or the pmts table is adding blank records.
So when I try to create a query to get a list of registrants, I will get two fields with the same name and Reg Id, and one with a pmt and one without.
I want one record per person registering and Im not getting that in my database.
Most, but not all, people are paying for events. Some people are staff or scholarships.
I want to be able to see just one record for every person who has registered, whether they have paid or not.
Im either seeing two records with the same reg number, or missing people that have not paid.
I have tried all kinds of configurations as far as relationships and Reg form and Im pretty stumped at this point. Any help would be greatly appreciated!
View 1 Replies
View Related
Oct 15, 2006
I posted a thread on here a few weeks ago about dynamic queries. I was recommended to use Query By Form. So I went to the Microsoft website, followed the instructions, but now it's not working. The query is returning ALL of the table records, no matter how many fields I fill in (or what I fill them in with). I think something may be wrong with the Query criteria, but I typed it just like the site said. If anyone has experience with this, any ideas what I'm doing wrong?
Form has 15 fields (all are related to a field in the table). 3 are combo boxes, the others are textboxes.
Here is the directions I used: http://support.microsoft.com/kb/209645/en-us
View 2 Replies
View Related
Dec 19, 2006
Hi,
I have a graph which uses the value of two combo boxes for beginning and end parameters. In order to work, the datevalue() function is used.
When i design the rowsource, it works. But when I exit Access and open it again, it doesn´t. Then the rowsource is either wrong or too complex.
What is going on?
Fuga.
View 3 Replies
View Related
Feb 13, 2007
Hi,
I'm working in Access 97 and I've got a form that I want to use to create filters with.
There are a couple of things that I'm not clear about and I'd appreciate any suggestions that you can make:
1. The form seems to remember the last filter, so when I click on the Filter by form button it shows the last filter by default. I've included the following in the click event:
RunCommand (acCmdRemoveFilterSort)
Me.FilterOn = False
RunCommand (acCmdFilterByForm)
Surely either of the first two statements should remove the filter, shouldn't they? and if not then what are they for?
2. I can't get the 'OR' tabs to show at the bottom of the filter by form screen unless I apply the filter once and then click on the filter by form button again. Is there any way of forcing these tabs to appear?
Thanks for any help/advice you can offer.
Regards,
Bernard D
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
Jul 21, 2005
Hi I have a Text box that stores a date of when a problem or query is received on to a customer account, when resolved the date it is resolved is inputted in the next text box as a resolved date. My third Text box then needs to display Yes or No depending if it took less than 28 days to resolve.
Ive used a Text box and DateDiff expression to work out the ammount of days in the control source, Called query dauration then a macro to test if its less than 28 days to display the yes or no. But this is not working days Mon - Fri. Has any one any ideas?
=DateDiff("d",[Date Query Raised],[Date Query Resolved])
Macro
IIf([Query Duration]<="28","Yes","No")
View 1 Replies
View Related
Aug 8, 2005
platform : access (adp) / sql server
Problem : form filter not executing in subforms
When I goto one of my subforms I can activate the form filter.
When executing the form filter no records show up, it just keeps showing my criteria. When disactivating the form filter I receive an error message telling that my view must be misspelled (it's about spaces). My view is called Vw_people , as a record source it works fine so it can't be misspelled.
Is the problem the adp connection or the subform? I don't know
View 1 Replies
View Related
Jun 27, 2006
Anyone help please ? I'm still fairly new to ACCESS so forgive me if I'm completely on the wrong track !
I wish to add a control button to a form that will prompt me to enter a date and then calculate and display a date nn (fixed) number of WORKING days in the future.
I've seen some functions suggested in the forum and as I'm unfamiliar with this topic, I have tried putting together some code (see below) related to an On Click event for the button. I'm having syntax problems and have been battling away at this for some time without success.
Suggestions please !
Steve
Private Sub cmdDate_Click()
Dim FirstDate As Date ' Declare variables.
Dim Number As Integer
Dim dtEndDay As Date
Dim dtinterimday As Date
Dim intcount As Integer
Dim lnginterimdate As Long
Dim intdays As Integer
Dim Msg
FirstDate = InputBox("Enter a date - dd/mm/yy")
Number = 20
dtinterimday = FirstDate
intdays = Number
Do Until intcount = Abs(intdays)
If intdays > 0 Then dtinterimday = dtinterimday + 1 Else dtinterimday = dtinterimday - 1
lnginterimdate = dtinterimday
If WeekDay(dtinterimday, 2) <> 6 And WeekDay(dtinterimday, 2) <> 7 Then
intcount = intcount + 1
End If
End If
Loop
Msg = "New date: " & dtinterimday
MsgBox Msg
End Sub
View 5 Replies
View Related
Nov 4, 2006
I have a report "Work Order Details" that that is based on a query and opens along with a form that is used to set filters. Based on samples I have looked at and reading, I cannot figure out what is missing. When I select my item form one of 5 unbound combo box 's and click the "Set filter" button, it brings up a paramter box?? If I cancel out the box, I still don't get a result. Just for the heck of it, I filled in a name in the paramter box, still no luck. The report property has "Filter On" as YES. The close button, clear button, and drops downs operate perfectly.
Here is the On Click Event info from my "set filter" button:
Private Sub Command28_Click()
Dim strSQL As String, intCounter As Integer
'Build SQL String
For intCounter = 1 To 5
If Me("Filter" & intCounter) <> "" Then
strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] " & " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & " And "
End If
Next
If strSQL <> "" Then
'Strip Last " And "
strSQL = left(strSQL, (Len(strSQL) - 5))
'Set the Filter property
Reports![Work Order Details].Filter = strSQL
Reports![Work Order Details].FilterOn = True
End If
End Sub
View 2 Replies
View Related
Aug 4, 2006
I have document management system for 2 projects in one db. I have a login form where user has to select the project id thru a combobox. And I have all the queries based on this combobox to display results in form or report. But after login and selecting the project, login form closes and main form opens to display data pertaining to that project. But it does not work, the moment we click close to open main form again query method apears displaying the same string :[Forms]![frmLogon]![Project]. This happens for all forms, reports. I cant't figure this out. Can somebody please help me?
View 2 Replies
View Related
Jul 14, 2006
I have my main form which is connected to my main table - Query 1
I have a lookup table (actually a view from SQL Server) which holds my user name - the username used to login to the database- just one value.
In my main form I have a 'Logged By' field. I want this field to default to my login name when I process a record.
I thought it would be as easy as connecting the lookup table to my main form and then in default value typing My_login.user_name.
Apparently not. It just has the #Name? in there.
Anyone have an opinion on this ?
I can use the =environ("username") in the default value which works to good effect but different users use each others PC and I would like the field to be defaulted to thier database login and not thier windows on.
Please help ! It seems so small and its driving me ceeerazy !
View 1 Replies
View Related
Feb 2, 2014
This is my passing criteria to query field:
IIf([Forms]![FrmUserSelection]![PricingType]=3,1 Or 2,[Forms]![FrmUserSelection]![PricingType])
My field is Pricing Type and holds records 1 or 2..I would like to pass value from my group option from a form.It works fine if group option has a value 1 or 2 but it displays no records if option value is 3 What is wrong with my code.
View 4 Replies
View Related
Jul 20, 2014
I inherited this quote and trying to enhance it but having problem.
The filter in navigation form is not working but it is on its own form, the filter is working without problem.
View 5 Replies
View Related
Aug 14, 2014
I have a specific question on the datediff function.
My example is =DateDiff("d",[Policy Issue Date],Date()) where [Policy Issue Date] is the inception date of an Insurance Policy.
I need to determine how many days the policy has been inforce. The formula works great in a query and I can see the number of days in that field when the query is run.
However, my dilemma is I want the same function to run off of a text box using its control source property and have the number of days calculate and be visible for each record on the form. This part is not working and the field is returning the #Error? message.
View 5 Replies
View Related
Dec 19, 2013
When I select a row on a split form I would like the up and down arrow keys to move to the previous and next record. However this isn't happening.
When I select a row and press the down arrow nothing happens.
I have the navigation buttons set to no because of the issues I'm having with them.
How to get the up/down arrow keys to work on a split form??
View 3 Replies
View Related
Jun 21, 2013
I am trying to created an IIF statement in a field I have in a form.
I have entered the following statement but it keeps coming up with the following error and I cannot see where I am going wrong.
The expression you entered contains invalid syntax, or you need to enclose your text data in quotes
=IIf([RenewalInstallment]=0,(12-[MFAccepted])*[CurrentAnnualPremium]/12)*(1-[DiscountAccepted]/100),IIf RenewalInstallment]<>0,(12-[MFAccepted])*[RenewalAnnualPremium]/12)*(1-[DiscountAccepted]/100)
If I enter the first part of the If statement i.e.
=IIf([RenewalInstallment]=0,(12-[MFAccepted])*[CurrentAnnualPremium]/12)*(1-[DiscountAccepted]/100)
The field calculates correctly however there seems to be something wrong with the nested if.
View 6 Replies
View Related
May 12, 2015
I have a bound form to an invoices table. The form details all invoices raised, all payments made and an outstanding balance. The outstanding balance control is just a basic text box.
On form load, I go to the payment table and select all payments into a recordset, I then add up all payments and use the following calculation:-
Balance = InvTotal - paytotal
The Invtotal is the control on the form that has it's control source set as sum(invoicetotal)
The calculation used to work and the correct balance was displayed, indeed, for one particular client, the calculation works, but for all others, the summed value is blank and so the balance is effectively set to the paytotal value.
I know this is to do with the timing as the form loads and it's records/data are made available, as I have an update button that does exactly the same things as the form load and when pressed, all numbers work.....primarily because the summed invoicetotal value is now available in the form control.
I can see what is happening, but not sure why...I thought that form load gave you all records and would have populated the summed control before triggering the load event....obviously not.....
View 9 Replies
View Related
Feb 5, 2014
I have a cancel button on an add new record form and its not working for some reason. When I press cancel it prompts if I really want to cancel and when I press yes it cancels the record creation BUT it adds a number to the recordID autonumber as if one has been created. Is there anyway to stop this? Here is my code
Option Compare Database
Private Sub Cancel_Click()
On Error GoTo Err_Cancel_Click
If Me.Dirty = True Then
[Code] .....
View 14 Replies
View Related
Dec 1, 2005
Hello all,
I have combo boxes populated with all values in a particular field, then shunt the form onto that record (standard combo box for selecting records from a list in other words).
Problem is, these boxes seem to stop working if I leave the form for another and then return to it.
Here's the code Access puts behind:
-----------
Set SerialRS = Me.Recordset.Clone
SerialRS.FindFirst "[Serial Number] = '" & Me![Combo60] & "'"
If Not SerialRS.EOF Then Me.Bookmark = SerialRS.Bookmark
-----------
The form may be opened and closed via other processes (although never unloaded), but when I come back to it these combo boxes always stop working! Why?
View 3 Replies
View Related
May 12, 2015
I have a navigation form which has two subforms on it (ie 2 tabs linking to different forms). I have got aq filter working for one of the forms but not on the other. This is using
If IsNull(Me.txtoperationscontract) Then
MsgBox "Please type a contract number into the textbox!", vbInformation + vbOKOnly, "Incorrect Details"
Else
Me.OperationsSubform.Form.Filter = "[Contract]='" & Me.txtoperationscontract.Value & "' "
Me.OperationsSubform.Form.FilterOn = True
End If
The problem is that it does not work on subform B because the Contract field does not exist.
View 6 Replies
View Related