Over 1 million tech questions and answers.

Microsoft Access Subform error

Q: Microsoft Access Subform error

Hello I am inserting a subform in a main form but in the subform wizard I cannot see the forms that I already have in the database to insert. I could see them before . I have no idea why this is happening . I used a different computer and triedand the wizard worked fine .

I did some search and it seems a problem with the references but even they seem to be fine when I go in the module view and check them
PLEASE HELP !!!!!!!!!

Preferred Solution: Microsoft Access Subform error

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Microsoft Access Subform error

Read other 8 answers

I need to create a subform with about 5 tabs that will display a variety of information gathered from a number of queries and tables, within each tab. If it is not possible, please tell me, but I had such marvelous luck with my first question, I have faith that I'll get something usable for this one. Please help.



A:Microsoft Access: Create a tabbed subform within another form

Gotta take my advice with a little trepidation, girl.

I just checked this out.

Make a (main) form.
From the control toolbox, pick and draw a tabbed control on your form. It's got tabs, right? Make the control big enough to hold your first tabbed page of data.
Save your form.
Now, make form2 with the info you want on it.
Close that form.
Open main form w/forms list showing in the background.
Grab form2's NAME and drag it onto the tabbed page.

Do the same for other tabs.

That should get you started, but I can never figure out how to change the source data, or to make the data in this tabbed page match the right record you might be looking at in the main form.

Another trick that'll prolly work (maybe better yet):

Make a form with all the fields you want. THEN, created the tabbed pages with the control and drag the fields from your form into your tabbed control? I'm thinking that'll work...

Read this for a bit of info too:

Read other 3 answers

Hi –
My problem in Access 2007 is with the Openform command button; executed from a Subform’s subform. Ie. Command button is nested on third level. [RecommendationID]=[Forms]![x01aTRACKING]![xx00Issues]![tbl_Recommendation subform]![ID]
​The form opens fine for record/data already stored in the database. For new [tbl_Recommendation subform] data, the form which opens does not go to the corresponding [RecommendationID], instead opens a blank form. I can however enter in the desired [RecommendationID] label, to which it will populate with correct data - I’d like to avoid this step. Have tried
Requery after Openform in the OnClick event of the ‘Main form’, also tried Requery on the OnOpen event of the new form with no success. Anyone have any ideas?

A:Solved: Access 2007: Subform subform button to open form

Read other 16 answers

I have finally worked out the form structure, but cannot see who to link it all together. The structure of the form

Main: Players
Subform: Week number
Subform within subform: Game selection
For each week, each player is allowed to make multiple selections from games and enter a stake, but i can not work out ehat else I need the the subform within subform to make it work for each player – can anyone see what it is?

A:Solved: Access subform within subform design/ link fields

Read other 8 answers

I have a form and in it is a subform with student's grades
How can I query this so I can show the last entry only

A:Access subform

Create a Join Query between the 2 tables. On the View menu click "Totals" (while in Design view) then on the grid area select "Last" under the column for the appropriate field from the "Totals" row.


Read other 1 answers

Fairly new to Access but I have managed to get this far. I have a database tracking prospects. The call results are listed in a DB named Calls and it is a subform in Contacts. The subform display is in Datasheet format. When I display a contact, it shows the correct calls (linked by call ID and Contact ID) but the data runs into the end of the space provided. It is not truncated, and the scroll bar will not go far enough to see the last few letters. I can actually get it to within a couple of characters.

Here is some of the things I have tried. Made the Notes field a memo so it would not be restricted to x characters. Tried text field but the 255 character limit was a bit of a problem, (sometimes the call results will exceed 255 chrs) but it would not let me display the entire record anyway. Finally made the Datasheet rows wider and entered a CRLF - that worked okay but would rather have some form of wordwrap- I can't see end-users typing to the end of the container and hitting <return> to finish the entry.

Beyond the obvious problem, what are the relationships between, width of datasheet sub-form, width of container holding it in the main form..., can Access be made to wrap text in a field that has a greater number of characters than the container that will display them width-wise?

A:Access SubForm Datasheet

SRoberts, welcome to the Forum.
Well done in getting as far as you have, unfortunately you have come across a bug in the Access programming, in Forms the Field and the Record do not use the "Can Grow" property as they should. It works in Reports without any problem, but not for Forms in Access versions up to 2003, I am not sure about 2007 though.
You can use the Continuous Forms mode instead of Datasheet to display your data and make the Record larger depth wise, it will just waste space on the records with less data.

Read other 2 answers

I’m having trouble creating a form for which to take orders.

Process is for each week, a player makes a selection of outcomes/bets (from minimum = 1 to max = number matches for each week). Simple as that.

My problem is with the [Orders] form which I need to for the selection (of outcomes/guesses) to be filtered by what’s available for the week.

At the moment, it’s showing items for all weeks... Any ideas?

A:Solved: Access subform

Read other 15 answers

i have a database i'm developing for a non-for-profit org offering courses to underprivileged kids between 04-19. the courses are split into 4 categories so i cannot just have one table for courses. the end user does not want this as courses are added to each category every term.

so the tables i have are students, cat1Courses, cat1StudentCourses, cat2Courses Cat2StudentCourses ETC..
i have subform in the cat1StudentCourses which allow me to asign students to courses in that category. they can have many courses. i am using look up wizard in this subform to select a course. but whenever i asign a course using the look up it adds a new course in the courses table creating a new record with new a course id so i have 2 course with same name in courses table. if i asign the course using the course id it does not create a new course in courses table.

i havnt been using access for that long so never experienced this problem

i can email the database over because its difficult to explain?

A:Subform problem in access

Read other 14 answers

Guten tag, all.

Anyone out there tell me how to do code to shrink a continuous-form subform on the fly in Acc2K?

That is, I have a search procedure which, depending on some configured options, should or should not show some controls on the subform which shows the search results. As space is limited, I'm trying to shrink the subform to show more records when those controls aren't in use.

Resetting the detail height of the subform doesn't work, perhaps because I'm not opening the form in design view first. Dunno.

Do you ??

n'backupd'othahside |--&gt;

A:VBA/Access: shrink a subform

One of the big differences between VB and VBA is that you can do much more at runtime in VB. To change the design of an object in VBA you must be in design view which won't work at all if you plan on making an .MDE file.

What I would do in this case is to create two different subforms and use VBA to set the SourceObject of the subform control to switch between the subforms. If you want the current record to be the same when switching, create a variable in the main form which will hold the PK of the current record before the switch. After the switch use findfirst to re-select the current record. As far as the user is concerned, it will look like the design of the form just changed a little. You won't be able to tell that it's a different form!

Let me know how it works. Good Luck!

Read other 1 answers


Need some help. I have a form with a subform that I want the subform to filter the data based on the selection of an item in the form. Ex: I have 3 disciplines: i.e math, science, english. My subform pulls a list of classes for each one. I want it to only show the ones that have been selected. So if the discipline selected is Math only show math classes. started out with something basic to expand on:
If IsNull(Me.cboSelectDiscipline.Value) Then
Me.FilterOn = False
Me.Filter = "Discipline = """ & Me.cboSelectDiscipline.Value & """"
Me.FilterOn = True
End If
But it's not doing exactly what I want. Help please!

A:Filtering in an Access subform

Read other 9 answers

I have created a form that uses the default view of continuous forms. I have also created a double click event that will open a new form based on the status of one of the fields in the form. Everything works fine and dandy from the form itself and it performs like it should. Once I put this form into a subform the filter will not work when you double click the line item to get the information form and promts you for the fields ID number in a dialog box. The main form is unbound so there is not need to link child and parent fields.

A:Access 2003 subform

Can you post it?
Does the VBA need to refer to the Parent form's name or the subform's name?
Just guessing really.

Read other 1 answers

Hello: First of all, how do I fnd my old post to mark it solved?

My problem this time is:

I have a main form and within that form, I created a sub form. My subform only has 3 fields, name, due (yes or no), and received (yes or no). My main form has a lot of other fields.

Question#1: On my subform, how do i do it to where If I have multiple names t enter, the form will automatically add a new row for me to add another name once I do my first entry.

Question#2: How do I make it to where the information entered, stays as first record and does not carry over to the next record. The problem I has was I entered info on my subform, but when I went to the next record on my main form, whatever info I entered on my subform, carried over to the nxt record.

Question#3: Since my subform and and maif form has no related data, I want to create a query to where it will link by record number. HELP PLS

A:Subform in Access 2007

Read other 7 answers

When on a main form and your clicking a command button to access another form with information on it, and you only want some people to be able to do that there is a way to ask for a password with the VBA code does anyone know.

Also when in a form is there a way to make the subform invisiable until you have completed all fields in the main form then it becomes visiable.


A:Access VBA code for password and subform

On the second question about the invisible subform, here's an example that's not really the cleanest code, but it should get you started. Change the ALLCAPS to your form and control names and change the conditional values to the ones appropriate to see if your form is filled out. If you have way too many controls to make this method feasible, you might consider testing only for the most required fields or providing an overide command button to make the subform visible.

Private MAINFORM_Current()
On Error GoTo Err_MAINFORM_Current

If IsEmpty(Me![CONTROL1]) Then
Me.SUBFORM.Visible = False
ElseIf Me![CONTROL2].Value = False Then
Me.SUBFORM.Visible = False
ElseIf Me![CONTROL3].Value = 0 Then
Me.SUBFORM.Visible = False
Me.SUBFORM.Visible = True
End If

Exit Sub

MsgBox Err.Description
Resume Exit_Form_Current

End Sub

Sorry, the reply form seems to lose the tabs and spaces in the code that gets it moved off the left edge. Anyway, hope that helps.

Read other 1 answers


I have created a database for my company EBP (non-for profit non gov org we provide courses for children when they are out of school). courses have been split into different course categories (not my idea) so each course category has its own table.

i have it pretty much finished and is in use by staff, apart from one thing when i go into students then click on frontiers course (one the categories) it does not let me select the course in the sub form and it does not bring up the details on the student im looking at. it fine works for the other categories such as easter course and summer college (take a look).. it should work for frontiers category but does not? it used to work i actually had a similar problem and was solved on here before.
i 've checked the subform properties for the field but cant see anything wrong.

database attached saved as older version 2000-2003
any ideas

A:Solved: Subform problem in access

Read other 16 answers


I need to create a form that shows the same table in two ways
1. Tabular layout on top of the form
2. Columnar layout on the bottom of the form

I tried to add one of the layouts as the subform, but when I open the form, the Tabular layout shows only one record.

Is there way to display two layouts in one form?


A:Solved: Access 2003 - subform

Read other 8 answers

I have a lookup form with a subform atttached to it. Its purpose is to allow for users to pick a year, and then all the calims for that year will show up in the subform. The subform has a detail button which is linked to another querry(through macros) to show the claim in more detail. I was able to make this work fine, but once I finished imputting all the data and went back through it, I found this to not be working. In the header I have the labels, which appear fine, but in the detail section of the form, which is where I have the text boxes, is blank. When I select a year int he main form(combo box) nothing changes either. Normally when I would have something like this not work, I would still see the outline of the empty text boxes but in this I see nothing. I have tried to re-add the fields and add other fields but nothing in the details section of the subform will show. (they still are visible in design mode only).

Any help please?

A:Access 2007, Subform display is gone

Read other 16 answers

I have a main form and two subforms A and B. These subforms are datasheet views and when I set them up I put the unbound field [Time] in the header of Subform B to total the field [Total Time] Total Time is a calculation field. The [Time] field I coded in the Control Source as =sum([Total Time]) and then in Subform A used a bound field [Total Hours] and in the Control Source entered the code =[subformB].form![Time]. I viewed the two forms (linked through master and child) as form view and the formulas were were working ok.

When I changed back to the default view of datasheet and attached them to the main form (again linked), the Total Time field, now showed #error until I click + to open each line and then the true value would appear.

I cannot get around this error and even though I have pickup this problem on different access sites, no one seems to have an answer to correct the error message. I have used the code =me.[subformA].[subformB].form![time] and other versions trying to rectify the error but no success. I need the form to appear without the error message.

Thanks in advance

A:Access 03 Datasheet Subform values

Read other 6 answers

I have a database with student info in it, studentID being the primary key. It includes information such as gender, grade, etc. I then have a table with studentID as the foreign key and information on test scores. The fields on that table are as follows: studentID, test, date, score, type. So each student can have different tests (math, writing, history) and the type is either pre or post.

I can easily make a form to enter the student info with a subform to add all the tests for a student. What I want to know is that since there are only a fixed number of tests a student can take, can I just make a text box for say the reading pre test date and reading pre test score and once those are filled in have it populate all the fields in the test table with the correct info?

I have a dummy database with examples of what I have and want that I can attach if that doesn't make sense. Thanks in advance for any help!

A:Solved: Access 03 Form/Subform Help

Read other 8 answers

First, Happy New Year to all of you

A:Solved: access 2007, subform isn't doing what I want

Read other 16 answers

Hi to All!
I have been trying to do this without help but it's taking too long and I just don't know the proper syntax. I need the following:

I have a control on the main form called "Contract type" (combo box)

I have a control on the subform named "Contract type" (combo box). This is the master and child link to the main form.

From the main form, I need...
when the main form "contract type" is changed, I need the subform's "contract type" value to be blank (value = "")
I don't know the syntax to refer to the control on the subform. I've search the web and nothing I've seen is working.

Please help...THANK YOU!!!!

A:Solved: Access 03 - Subform Cntrls

Disregard...I got it. Thanks.

Read other 1 answers

I am running Windows XP with Office 2007, and my problem is specifically within Access.

I have a main form [YOY Main Form 1] that simply allows selection of an area (geographically) from a combo box.

I then have a linked subform [YOY Sub Form 1] that displays customers that are within the chosen area, and I have correctly linked the child/master links.

When the subform is open I want to be able to click on any customer and have a separate form open that displays information about the customer. This 3rd form is not linked or embedded in anyway, it is simply another form based on another query, but in the query pane I have set the criteria to [Forms]![YOY Sub Form 1]![Account Code].

The subform is set to continuous forms with record selectors set to Yes.

The problem I have is that when I click on the individual customer record, instead of the form opening automatically, I have a dialogue box prompting me for the Account code. If I enter my cust code the form opens as it should, but I would like this 3rd form to open automatically simply by clicking on the customer record in the subform.

Can anyone help please?

A:MS Access Record Selection from Subform

That is because you haven't included the mainform in the Criteria Row, this

[Forms]![YOY Sub Form 1]![Account Code]

should be

[Forms]![YOY Main Form 1]![YOY Sub Form 1]![Account Code]

You can also use Criteria in the VBA of the Command Button that Opens the Form as well

Read other 2 answers

Hi, I have an access 2007 database where I have a main form and several subforms in tabs.

I would like to have the user be able to "Add a Record" to the subform. The simple "Add record" from the button wizard does not work. What do I need to do to add a record to the subform?


A:Access 2007 - Add record to a subform

Read other 16 answers

Is there a way to use a combo box in a subform so that it searches only the records in that subform that are the child set from the master form? The primary and sub-forms are based on distinct tables with a one-to-many relationship and enforced referential integrity. In other words, I need to be able to search within the subform among only the related subset of records.

What's really annoying about this is the fact that, while the combo box grabs the entire recordset, the navigation command buttons that I added (GoToNextRecord, GoToLastRecord, GoToFirstRecord, etc.) are actually limited to the correct subset of records. I don't get it.

Here's the SQL statement for the row source property on the combo box:
SELECT Donors.DonorID, Donors.DonorBusinessName, Donors.DonorLastName, Donors.DonorFirstName, Donors.ContactID, Contacts.ContactID
FROM Contacts INNER JOIN Donors ON Contacts.ContactID = Donors.ContactID
ORDER BY Donors.DonorBusinessName, Donors.DonorLastName, Donors.DonorFirstName;

And here's the VBA code for the after update event on the combo box:
Private Sub DonorBusinessSearch_Combo_AfterUpdate()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[DonorID] = " & Str(Nz(Me![DonorBusinessSearch_Combo], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
------------------------------------------... Read more

Read other answers

Hi All,
I have 2 tables. OrderHeader and OrderDetails. The header table has the customer and order number info and the details table has the details. One header record can have 5 records in the details table. (5 stock items, despatch date and qty etc)

I then have a form with the header table and a sub form with the details info. I want to add a date in the header form and upon change of that field, I want all the date fields for each record in the details table/sub form to be updated to that same date.

Is this possible?

I hope I have made this clear.


A:Solved: Access Form/SubForm

Hello again Simon, you know it is.
You just want me to write it for you.

Read other 3 answers

I have hit a totally new and unexpected problem after many years of using MS Access.

I have a fairly large and complex MS Access (2003) database with a large number of tables and forms and a significant number of subforms. Quite suddenly on trying to add a subform in the usual way (i.e. by clicking within toolbox and dragging onto a form) I find that I am not presented with a list of forms to choose from but simply placing an unbound form on the form with "Chidnnn" as the caption.

This also happens in every database. Have I inadvertently changed something in the Access settings? I would appreciate any help.

A:Access subform unexpected problem

Read other 8 answers

I have a form with several tabbed subforms. Several of the subforms are for gathering peoples names and information (lastname, firstname etc.) the forms are named for the persons role (reporting party, complainant, victim, etc.)

How can I post information entered into one subform if a check box is selected? (reporting party = complainant)

I am trying to eliminate repetitive entries but have to duplicate information across tables.
XP / Access 2003

A:Solved: subform to subform conditional post

Read other 14 answers

I have an existing database I use for organizing information about our employees. My main form is the employee form, which I then have split up into 6 pages using the tab controls. For the most part, it works fine.

The last page/tab holds a simple subform with only four fields.
- Discipline (about 12 possible: using a combo box)
- subdiscipline (filters only those related to the discipline, also using a combo box)
- Date started the subdiscipline
- Date ended the subdiscpline

The discipline combo box works fine. The problem is with the subdiscpline combo box. It is pulling data from a simple 2-field query (discipline & subdiscipline). It is suppose to use the discipline combo box selection as the discipline criteria in the query, filtering in only those I need, but can't get it to work.
I actually had it set up in a different database and it worked fine, but when I imported it in as a subform for this one, I started to have problems.

If I reference the control in the subform as
I get only an empty combo box for my subdiscipline selections.

If I reference the control same control as
I get an "Enter Parameter Value" input box as if it cannot find my reference.

I know I deserve a slap on the wrist for it, but I did use spaces in some of these names (employee form; authorized disciplines). I don't know if that's what the problem is or not.... Read more

A:Referencing controls in Access subform not working??

Read other 13 answers


I have two related tables, (Master=Locations; Child=Stations). There can be multiple stations at a given location, and the link is from Location_ID in the Locations table and Location_IDF as a foreign key in the Stations table.

I have a form showing the Locations data, and a linked subform with the Stations data. There are three different types of stations (lets say they're called A, B, and C), and the type of station is stored in a field called "Type" in the Station table.

So, here's the problem...I'd like to have the Stations subform open to only show those stations where the station "Type" is type "B". I'm assuming that some sort of permanent filter will need to be added to the subform to make this happen, but I'm not sure where or how to apply such a filter.

Any assistance would be appreciated!

A:Permanent filter on a subform in Access 2007

Read other 7 answers


I have a Parent form (frm_Def) with three subforms on it.

Ive got a button on the parent form that i wish to make submit the info from all the subforms to a table.

I'm just not sure how to reference the objects on the subforms from the parent form.
For starters, im going to validate the button on the parent form to display a message box if the 'Ref' field on one of the subforms is empty. Ho would i do this?

I've tried..

Private Sub cmdAdd_Click()

If IsNull(Forms.frm_Def_Base.Ref) Or Forms.frm_Def_Base.Ref = "" Then
MsgBox ("no ref on subform 1")
Msgbox("ref: " & Forms.frm_Def_Base.Ref)
End If

End Sub

Can you point me in the right direction??

A:Solved: Access 2007 Subform Control

Read other 16 answers

In an Access database Form I have a listbox which is populated by a table, in the same form I also have a subform populated with the same data. What I would like to do is when I dblclick on the record in the listbox, the record also shows up in the subform next to it. What is the best way to accomplish this?

A:Solved: Listbox controlling subform in Access

Read other 16 answers

I am making a contact management database. I am working on a form with a subform (or if needed subreport).

The Tables are Main Family Table (Form) and Family Members (subform)
Basically the Main Family Table contains address, last name and phone.

The Family Members contains info about the individual family members - name, e-mail, insurance info, etc.

I want to have only one table with the home address so that we can send one statement to a family instead of wasting money and sending numerous statements.

I have tabs on the subform. I would like each individual family member to have their own tab. So if the Smith family had 3 family members, there would be three tabs to choose from - each labeled with the family members name. If the Jones family only had one person, there would only be one tab.

Can this be done?

Thanks in advance

A:Access 2007 Multiple tabs in subform?

hello melonhead, I am sorry but I don't think your idea is going to prove very practical, I am not saying that it can't be done, but it will be a lot of work.
First of all, unless you Program the tabs and their names using Visual Basic you are going to need a Mainform with SubForms for each Family.
The normal way to do this would be to have a Combo Box to select a Family and then a Subform with One Record per Family Member.
The decision is yours as they say.

Read other 1 answers

What is the syntax for getting to the recordset underlying the source object in a subform control.

For a regular form the recordset object can be obtained using:

Forms("form name").Recordset

but the form displayed in the subform control is not a member of the forms collection (because it is not officially "open"?) and so cannot be referenced through the forms collection.

The subform control "SourceObject" only returns a string as far as I can tell and that doesn't help because in order to use it you would have to be able to refer to
and I've already determined the the form inside the subform is not in the forms collection.

It seems like there ought to be a simple way to get to this recordset.

For that matter, how do you get to any of the properties of the form that is the source object for a subform?

A:Solved: MS Access: Getting to the recordset underlying a subform

A subform is a control of its parent form and must be referenced as such. Here's a good FAQ from AccessVBA.com that illustrates the proper reference syntax between forms.

The quick answer is:

'Four reference examples.



Read other 3 answers

Is it possible to view and edit existing records in a Subform? And by existing records I mean those created in a previous session of the database (saved and closed, then reopened). I've already set my subform properties Continuous form, Data Entry = No, Allow Edits = Yes. I can view existing records on my main form but not on the subform.

A:Access - Edit Existing Records in a Subform

Read other 15 answers

I have been working on a training enrollment tracking system, which this forum has helped a great deal! I am trying to finish it up, but an outstanding issue.

I have a form/subform to allow scheduling employees into a class. When the mainform opens, the combo box used to select the course/course date is blank. However, the subform, which should contain the employees registered for the class, contains the data for the first class in the list. How do I get the subform to open with no data? Both forms are using combo boxes; the main form is unbound, shile the subform combo is bound.
Thanks for your help.

A:Access 2003 how to blank a subform on entry

If ths Subform is only going to be used to Add New Records then you can set it's Property "Data Entry" to Yes.
Whenever the form is opened it will be on a new record.
However I am concerned that the mainform is unbound, how is the subform picking up it's data form combo selection?
In it's query?

Read other 1 answers

I have a form with a subform. When I open the form, I want the subform to display a new record. How do I make that happen? If I use a macro to "open new record" when the form opens, it displays a new record for the form as well as the subform. I want only the subform to display a new record.

A:Open Subform with new record - Access 2003

I am not quite sure about the logic of what you want to do, I would have thought you would want to see historical records, but there are 2 ways to do what you want one is to set the Subform's "Data Entry" property to "Yes", this means that it can only accept new records and display those entered since the Form was opened, not older records.
The other involves using VBA code in the Subform's "On Load" event procedure which says

The VBA method should still have the old records available, just move to a new record.

Read other 3 answers

If you open the Customer form you will see a Balance within the Payment subform. The issue I have is that the balance is not showing unless payments have been rendered. I tried doing this within the main form but have had issues with it rendering the correct balance and updating.

I am all for doing it a different way, if there is a better way to do it.

A:Access help needed with a Balance relating to a subform

Read other 16 answers

I have an access main form that contains a subform. The subform is setup to display in datasheet view.

On the subform there is a memo type field. Is there a way to have the memo field to word wrap?

A:Solved: Access Subform - Memo Field

I don't think you can in Datasheet view. You could try setting the Can Grow property to yes.

Read other 2 answers

I'm just learning Access and am setting up a database where the Form has customer information and the subform shows their order details. There are only two fields in the subform, Product Name and Quantity. The product names are listed in a combo box. How do I enter more then one product order? I can add one entry but I need it so when I hit enter it gives me another line to enter another order.

A:Access 2003 Adding Record in SubForm

In the SubForm's Default View property set it to "Continuous Forms"

Read other 1 answers

I need to open a form and show only where a field in the subform is equal to a value the user gives. The problem I am having is referencing the field in the subform. Anyone know how to do this?

A:Access: Referencing subform fields in Docmd Where

Read other 8 answers

I have a [MAINFORM] with a [SUBFORM] on it. I want to click a button on the subform that will open a [POPUP] form with the same[ID] as the [SUBFORM] and space to enter additional information pertaining to that form.

I tried this two ways. I don't do VBA very well so I'm trying either critieria on the subform's underlying query or a where statement in the button property. In both cases, I don't seem to be referencing the subform correctly.

First I tried: [ID]=[Forms]![SUBFORM]![ID] on the button and then on the query. I did the same for the rest.

Then I tried [ID]=[Forms]!MAINFORM.SUBFORM.ID

Then I tried [ID]=[Forms]![MAINFORM].SUBFORM![ID]

I've searched for a way to do this but I can't find this exact situation.

A:Referencing a subform control access 2010

The easiest method is the Query Criteria set to

Note no equals signs or anything else, you do have to ensure that the subform name is as shown on the mainform.

Read other 3 answers

About a year ago, I created an input form that contains a subform in which are listed all the contributions of a member of the organization. Under the subform -- IN THE MAIN FORM, not within the subform -- I had placed a field that summed the contributions for that individual, and another field that displayed the domain sum (DSum) for all contributions. Both have worked perfectly every since.

The field that sums the contributions for the individual used the formula "=[Contributions subform].[Form]![ContribSum]". The field that does the domain sum is "=DSum("Contribution","Contributions")+IIf(DSum("MatchAmt","Contributions") Is Not Null,DSum("MatchAmt","Contributions"),0). I removed the field "MatchAmt" from the table, and changed the DSum statement to just "DSum ("Contribution","Contributions").

After doing that, both field yield only "#Error". Part of my puzzlement is the field "ContribSum". It is not a field in either table, and is nowhere in either form. I haven't the foggiest where it is or why the formula refers to it. I tried using just "=Sum([Contributions.subform].Form![Contribution]), but that for some reason reports only the first contribution; doesn't add all of them up.

So my question is, how does one sum number fields in a subform in a field OUTSIDE of the subform/in the host form?


A:Adding numbers in a subform (Access 2000)

Put the "=" back in front of DSum, so that it says this:

The "#Error" means that Access is trying to do some sort of operation that it can't pull off.

As for your sum question, it's cagey, unless you can program a little. The workaround is this:
In the subform, show the form footer. There should be a control there called ContribSub, I'm guessing, from your post. If not, make one.
Set its control source to


Once you're sure the subform sum is working, you can set the Visible property of the form footer to false. That way you don't see your total down there.
Now you can build a control source on the master form whose control source is set to

=[Contributions subform].[Form]![ContribSum]

As for why your other attempt wasn't working (the one that goes like "=Sum([Contributions.subform].Form![Contribution])"), you must remember that Access maintains only one "active" record at a time, per form or subform. So your control wasn't lying; I'll bet changing records in the subform would prove that. But it's only adding the total of the active record--this is the big difference from a report, where there are no active records.

Hope this helps. Let us know.

Read other 2 answers

I have a question involving a VBA procedure on Access forms. I'm doing some pro-bono work for a charity, and have gotten in over my head. I am new to VBA in the last two weeks, so please respond to this in a pretty basic level. Thanks.

I have a form called frmDonations with a subform. Behind the master form is the tblDonations with data on things related to donations received (Payee, CheckNo, CheckDate, etc.). Behind the subform is tblLineItems with data on what the payment was for, possibly several things in some instances. tblLineItems is linked to tblDonations with a many-to-one relationship using PaymentID as the common field. It's very similar to the structure of an invoice: for each invoice there are multiple lineitems in the sale. I just break down the transaction at the back end, with the receipt of the donation payment.

I actually have two versions of this scenario, one for complex transactions (involving multiple lineitems with the lineitem data being manually entered), and one for simple transactions (the norm, with only one lineitem involving the same data each time). The complex scenario is easy and is working fine. Now I want to set up a separate simple scenario in which the subform table's data is populated automatically, preferably with no visible presence on the master form. Ideally there would be no subform at all in the simple scenario.

I have tried writing code to run in the master form to write to the subform controls, but VB doesn'... Read more

A:Solved: Writing to Controls In An Access Subform

Read other 10 answers

Hi everyone, i have an invoice form, i want to create a subform that stores the clients contact details. How do i go about that?


A:Solved: Creating a subform access 2000

Read other 9 answers

I have a form with a subform on it. When I try to do a preview before I print it, the subform won't show up? I can't find a setting or anthing to make this happen. Have any idea's??? This is Access 2007.


A:Solved: Can't print Subform in Access 2007?

Read other 16 answers

Hi, I have a frm with subform. On the form is a delete button. Within this button I would like to include an If else statement. If there is data in the subform I would like a msg to appear "Do not delete' otherwise I would like to continue the script to delete the record on the form which includes a choice msg box (if I can get the If statement working then i will change the text for the second msg box) . I have included the code which I have attempted. If I click the delete button I get a message saying it can't find the form.

Private Sub DeleteProjectButton_Click()

On Error GoTo Err_Delete_Click

If Forms!frmProjectsubform!VolunteerID Is Not Null Then
MsgBox ("Do not delete")

Dim Response
Response = MsgBox("Are You Really Sure You Want to Delete this Project? Only delete if there are no Volunteers with Projects displayed.", vbYesNo + vbExclamation + vbDefaultButton2)
If Response = vbNo Then Exit Sub ' User chose No.
'User Chose Yes
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
Exit Sub
MsgBox Err.Description
Resume Exit_Delete_Click
End If
End Sub



A:Solved: reference access subform with If Else statement

Read other 16 answers


I am using Access 2003 and have a question-- I have a table called tblContacts, and an associated form with demographic info. I want to add a field to this form called "notes" , which would be opened with a button on the form (that way the notes on the individual would not be immediately visible to anyone walking by).

I created the subform Notes (and associated table tblContacts_Info). My problem is this:

I want the contact_id (unique identifier of individual) to automatically fill in when the subform opens with the value from the record of the parent form.

I tried creating a one-to-many relationship, and tried setting the record source as the contact_id from the parent table, but am having no luck.

can anyone help? Is there a better way to do this than a subform/second table? I just want to create privacy on the form...



A:Access subform (I think) and auto fill in question

Read other 10 answers