Why Isn't A Form Referencing A Value From Another Form?

Jan 14, 2005

Hi,

I am trying to access one form from another. the second form loads correctly and filters the records that I want to see but when I want to add a new record on the second form by wanting to repeat the key value from the main form it is not showing that value. i have set the property of the key field on the subform to be equal to the key value from the main form using

[Form]![Complaints Inbound]![Access #]

what could be wrong?

can anyone help?

thanks!

mozart

View Replies


ADVERTISEMENT

Referencing A Sub Form Within A Tab Control

Apr 11, 2005

Hey guys,

a quick question.

I have a form called "FormA"
within that form i have a tab control
and one of the pages is called "Page1"
inside that page1 i have a subform named "subform1"
and finally inside subform1 i have a field named "field"

what would be the correct syntax to reference the value of the field???

been messing with this for awhile and am getting a headace, was hoping someone can help

thanks alot

Ricky

View 2 Replies View Related

Referencing Many Tables In One Form

May 8, 2006

Hi all,

Firstly I am trying to retrieve data from three tables in a format like this

Table Data Fields Descirption

Table 1 A,B PC Details
Table 2 B,C Software/PC
Table 3 C,1,2 Software Details

Where the B's are linked as are the C's and these both form primary keys in their respective tables.

My form has on sub form in it. The main for refers to Table 1, displaying Fields A and B. My subform is linked through child/master fields by B and is used to edit which software titles are installed on each PC. However, as C, the primary key for the software, is a code, it is not obvious what it refers to exactly. Therefore I use a combo box who's row source is query containing the software title (1) and the column widths precceding the software title are set to 0 so that software title (1) is visible in the field in the subform. Hence, although you change the title name on the form, the actual change is made in Table 2 altering the Software Code (C). This is fine, except that there is more than one version (2) of some of the software titles. The versions are shown in the drop down list for the software title combo as an extra colum, so you know you are choosing the correct one. But i also want a seperate field which actually shows the version chosen. I cannot link a normal text box to the same query as it doesn't have the relevant properties, but I can do it with a combo as I am effectively doing the same as for the software title.

This is all very well, I could just lock the combo box and be done with it, but it doesn't look very professional and is a bit confusing to the user. Is there away that I can get around this problem?

Cheers,

Matt

View 7 Replies View Related

Referencing A Field On A Form From A Query

Jul 24, 2005

Hi,

My situation is hard to explain but i will give it a shot. What i have is a db with employees and its being used to track training sessions. These employees are split into 6 teams and those teams are split into 7 teams each.

I have written two queries, first asks the user what team to display. This data is used in the second query. The second query asks for what training item we are searching for. The result of the 2nd query is displayed in a form. Displaying of the information on a form is important. This way the user can verify that the members on this list are the ones he is updating. Now I wrote a third query that works off of the 2nd and updates the datecompleted field with todays date.

Problem is when i post a button on the form to show all these employees complete it referes back to the first query and asks all the filtering questions again.

I would like to know if there is any way to run an update query from a form that has already been filtered. Or if there is a way to reference these records in a new query so as to avoid all the filtereing again

hope i explained it well

Thanks

Ricky

View 7 Replies View Related

Referencing Form Field For Query Between

Mar 10, 2006

Hey All,

I have a question regarding referencing a form using dates between.

Currently I have it setup as:
Between [Start Date] And [End Date]
on the query.

I want to reference a form, which i figured would be like this
Between [Forms]![frmSBReports]![txtStartDate] And [Forms]![frmSBReports]![txtEndDate]

But this doesnt work! :confused: What did I do wrong here? Any help as always is greatly appreciated!

Thanks!
Mateo

View 1 Replies View Related

Forms :: Have One Form Referencing Multiple Queries

Jul 3, 2013

I have a form that I want to filter by different fields on different occasions. i.e., I might look at all records that have a review date of earlier than today on one occasion and I might look at all records that have a Yes in a Yes/No box on another occasion (date then being irrelevant.)

I have finished the form which has a query as it's Record Source.

The only way I can figure out how to accomplish my goal is to copy/paste the form with a new name, copy/paste the query that is it's record source, with a new name, and then put the criteria I want in the new query and make that query the new form's record source.

Is there a more elegant way I can do this. For example. I have a form consisting of buttons that I use as a Navigation Form. Could I, in the VBA that opens the form when I click on it's button, stipulate which Record Source the form would use?

View 3 Replies View Related

Forms :: Referencing A Subform From Main Form

Jun 24, 2015

I have a form and subform with the following names:

frmBasic
sfrmCustomers

I have a unbound txt field called txtCustName on the mainform
I want to populate this field from a field on the subform called CustName when the record is selected.

I also have an unbound combo box with the cust ids using the row source from the tables record source from the main form.

I tried the following Code:

Private Sub cboCustNum_AfterUpdate()
Me.Filter = "[Cust_ID]=" & cboCustNum
Me.FilterOn = True

Me.txtCustName = Forms.frmBasic.sfrmCustomers.Form.CustName
End Sub

This didn't work. So I put "= [Forms].[frmBasic].[sfrmCustomers].Form.[CustName]" in the control source of the text box on the main form I want populated.

The name doesn't appear in the field. I get #Name? in the field.

View 4 Replies View Related

Modules & VBA :: DMax On Main Form Referencing Subform

May 2, 2015

I have a form - purchase, and a subform purchase detail they are linked with a field "puid"..I need the dmax to give me the maximum auto number field "pdid" on the subform in a textbox on the mainform.

I used the control source code:

=DMax("[forms]![purchase]![purchasedetailds]![pdID]","[forms]![purchase]![purchasedetailds]","[Forms]![purchse]![purchasedetailds]![puid]=" & [Forms]![purchase]![puid])

and the simpler:
=DMax("purchasedetailds]![pdID]","[purchasedetailds]","[purchasedetailds]![puid]=" &[puid])

View 5 Replies View Related

Queries :: Criteria Referencing Control On Form Not Working

Oct 10, 2013

I have a form (named frmAddSession) with a combo box (named Band_Name) and lets say i have it displaying the band "Band A"

I have a query where the criteria is [Forms]![frmAddSession]![Band_Name]. when i run the query the results are blank. but if i type ="Band A" it works just fine.

why won't my reference to the combo box on the form work?

In a series of deductions to try and figure this out, my form only has the one combo box, and my query is based on only one table and only has the one field.

View 5 Replies View Related

Forms :: Referencing Form Element In BeforeUpdate Procedure

May 28, 2014

I have an issue with a BeforeUpdate procedure that I am trying to get working. I'm using simple elements here as this is a test DB, not the real one yet.

I'm trying to get the value from a Text Box TextData into a string cString. I've used a Dim statement to declare cString - I think the problem I am having is trying to get the actual data from the form. The error I am getting is:

Run Time error '2465'

Microsoft Access cannot find the field "|1" referred to in your expression.

The code I am using is:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim cString As String
cString = [Forms!FormData!TextData]
End Sub

(I've removed some code that is either comments or working since I have to retype things!)

The line cString = [Forms!FormData!TextData] is where the debugger highlights as the error.

View 3 Replies View Related

Modules & VBA :: Referencing Parent Form On Requery - Error 2450

Apr 3, 2014

In short, here is what I am trying to accomplish:

1. I have a two-tier, tabbed Navigation form (Menu-Main).

2. One of the second-tier tabs opens a form (VendorMain) which displays a Datasheet based on [Query.Vendor_Query]

3. VendorMain contains a Command Button (EditButton), which calls a subform (VendorForm) used for editing.

4. Upon saving the edits, VendorForm's OnClose event is supposed to Requery the datasheet on VendorMain, so the edits are reflected when the user returns.

I have tried over a dozen different permutations of the following, but nothing seems to work:

Me!Parent.Requery
Forms!VendorMain.Requery
Forms![Vendor_Query].Requery
Forms!Main-Menu!VendorMain.Requery
Etc...

VendorForm opens, edits, saves and closes perfectly. However, I consistently get the following error and the parent form is not requeried:

Runtime Error 2450 - Cannot find the referenced form VendorMain

Code available upon request.

View 4 Replies View Related

Forms :: Time Clock - Referencing Subforms On Navigation Form

Jan 15, 2014

I have a complete working timeclock and trying to add the forms within the navigation form. I know I have to go back and re-reference everything and have already done so with the queries. But I cannot get the setfocus to work.

Here is the setup.

NavigationForm (navigation form)
frmClockIn (top form)
frmClockIn_SUB (bottom form)
Open Navigation > Time Clock.
Select an EmployeeID from the dropdown
Click on clock in. (successful)
cboEmployeID goes blank and try selecting the same employeeID to clock out and I get a debug at

Me.frmClockIn_SUB.SetFocus

I think there is a problem with my cboEmployeeID_AfterUpdate() as well.(related?) which used to be
Private Sub cboEmployeeID_AfterUpdate()
me.refresh
End Sub

I have replaced "me.refresh" with "Me.frmClockIn_SUB.Form.Refresh"

(It used to break here, but not after I changed it.)

Not too sure where to set these forms to in the code

I have attached a blank copy ....

View 3 Replies View Related

Forms :: Referencing Input Information From A Continuous Form On A Report

Jul 1, 2014

The database I have created is to produce product description sheets. From the switchboard, the user clicks a button that opens a form on which they can enter about 5 bits of information , then select the product they wish to produce the product sheet for and when they click a button, the product sheet is produced. The product sheet is a report with a subreport. The information entered on the form is included with more information from the database on the main report and the subreport is based on a union query which combines information from 2 tables to list the items included in this product. (the information the user inputs into the form is information that changes depending on the situation and is not stored in the database.

Now comes the next step in this process. Just as the information input into the form is temporary information, there is also one bit of information that needs to be input on a temporary bases for the items that are listed on the subreport. Each of the items on this subreport needs an assignment of AAA or BBB that needs to appear in the subreport on the line with that particular item. There can be one item in an product, or there can be many and the listing of AAA or BBB can be different from one item to the next or they could all be the same. The assignment needs to be made on an item basis.

My thoughts on this were to have a subform appear once the user selects the product on the form which would list all of the items and allow them to select either AAA or BBB in a column on this form. Then when the click to open the report, those assignments would carry through to the report.I have been able to create a continuous form displaying all of the items based on the union query but that's as far as I can get. Not even sure if that is the way to go.

Is there a way to reference the AAA and BBB input on the subform I described so that it displays in the report.

View 7 Replies View Related

Forms :: Button In Form To Open Different Form And Chose A Customer Based On Last Form

Mar 26, 2013

Basically I have a Customer Form, which I have a New party button on it,this button opens up the party form to a new party, what I would like it to do is open up a new party but make the new party for the customer I had selected in the previous form.I have tried the GoTo macro's but cannot seem to get it to work.

I am thinking on clicking the button it will need to get the Customer ID, and then open the party form, create new party, and paste in the Customer ID, which then updates the Name - Date - Address - Company Fields.

View 5 Replies View Related

Forms :: Opening A Form From Another Form Via Combo And Auto Loading Form Data?

Apr 14, 2015

I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.

The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.

The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.

View 9 Replies View Related

Referencing

Oct 3, 2007

I know this should be very simple, but I've already tried every possible entry from the site given in the FAQ section of this website (http://www.mvps.org/access/forms/frm0031.htm), but it keeps access keeps asking for a parameter value!!

i have a subform(frmSub2) on a subform(frmSub1) on frmMaster.
I have a combo box (cbo2) on frmSub2 that grabs its value from the value chosen from another combo box (cbo1). Here's what I have tried in the query builder (none work!! why?????):

-[forms]![frmMaster]![frmSub1].[form]![frmSub2].[form]![cbo1]
-[forms]![frmMaster]![frmSub1].[form]![frmSub2].[form].[cbo1]
-[forms]![frmMaster]![frmSub1].[form]![frmSub2]![cbo1]
-[forms]![frmmaster]![frmSub1].[form]![frmSub2].[cbo1]

Please help!!

View 3 Replies View Related

Forms :: Send Data From Pop-up Form To Main Form (sub-sub Form)

Aug 27, 2014

On the form: User enters first name, then last name. Upon updating the last name field, I would like another form to pop-up and display all the people with that same first name and last name that the user just entered.

On the pop-up form: All of the matching first names/last names are listed with a button control beside each record that says 'Select'. The user clicks the select button beside the record he/she wants. This pop-up form closes and all of the data from this selected record is now showing on the original form.

So far, I have a query/form that pops up only showing the matching first/last names. I'm having a hard time getting my original form to auto-populate with that record that the user selects on the pop-up.

(Also my main form is actually a sub-sub form - so in my trials I could've been massacring my syntax trying to point to it.)

View 5 Replies View Related

General :: Create A User Form With Sub Form Using Form Wizard?

Aug 10, 2013

I am trying to create a user form with sub form using the form wizard. I have only 2 tables, Employee (main table) and Vacation (subform table). I pick the fields from Employee Table then fields fro Vacation, but the wizard treat the Vacation as main form and Employee as sub form.

View 4 Replies View Related

Referencing A Variable

Apr 6, 2008

I want to be able to reference a variable dependant on where I am within a loop. I have myct1, myct2 and myct3 looping then a mycount loop and I want to add a record to a table taking the relevant myct value dependanct on the current mycount value. Any ideas anyone?

Here is my code:

for myct1 = 1 to 3

for myct2 = 1 to 3

for myct3 = 1 to 3

for mycount = 1 to 3

mytable.addnew
myvalue = <if mycount = 1 then myct1 etc>
mytable.update

next mycount

next myct3

next myct2

next myct1

Any help most appreciated.

View 1 Replies View Related

Referencing A ComboBox

Mar 7, 2005

I have code on a subform that is referencing another form that is still open (not the parent form, but the form which's button openned the form that the subform is on). I'm trying to get the value from a combobox that contains the data that will filter the subform in question. See below.
==========================================
Dim strForm As String
Dim strSQL1 As String, strSQL2 As String, strWhere As String
Dim strSelect As String, strFrom As String, strJoin As String

strSelect = "SELECT tblMainData.* "
strFrom = "FROM tblMainData "
strJoin = "INNER JOIN tsubPermissionList ON tblMainData.ResponsibleParty = tsubPermissionList.FullName "
strWhere = "WHERE(((tsubPermissionList.UserID) = [Forms]![frmMainEntry].Form.[cboSelectUser].Column(0)))"
strSQL1 = strSelect & strFrom & strJoin
strSQL2 = strSelect & strFrom & strJoin & strWhere

If IsNull([Forms]![frmMainEntry].Form.[cboSelectUser].Column(0)) Then
' If the combo is Null, use the whole table as the RecordSource.
Me.RecordSource = strSQL1
Else
Me.RecordSource = strSQL2
End If
==========================================

I can't resolve the error:
==========================================
Runtime error '3085':
Undefined function
'[Forms]![frmMainEntry].Form.[cboSelectUser].Column' in expression.
==========================================

Somehow access thinks that the references to the combobox is a function. Can someone help me with this?

Thanks,
PC

View 4 Replies View Related

Referencing A Control

Apr 5, 2005

When clicking on a command button on a form in order to open another form and go to a specified record, i used to use a code similar to the following:

DoCmd.OpenForm "frmName", , , "[FieldName]=" & Me.ControlName

Is it in the same format the above statement if the form to be opened has a tab control ?

Thanks

View 5 Replies View Related

Referencing A Control

Dec 6, 2005

I'm trying to get the value of a textbox on one of my subforms and can't seem to get it properly referenced.

I have a main form Main with a tabcontrol having two pages. One page is Timesheets. Timesheets has a subform called Detail_data.
On the detail_data subform is the text box Time_In that I want to reference. I can get to controls on the timesheet page but not on the detail_data part.

Thanks in advance....

View 1 Replies View Related

Referencing OCX Control

Jul 10, 2007

Hi all

I've distributed a MS 2003 database to another office 1000km away using 2003 as well. The calendar control doesn't seem to be working. I'm assuming that the MSCAL.oxc isn't referenced. Is there a way I can do this programatically without actually having to talk someone through the referencing process over the phone??

Your ideas are appreciated.

View 2 Replies View Related

Referencing A Subform

Oct 28, 2007

When I run the following code in a module -- to change the value of a label in a subform ("Employees Trained List subform" is a subform of "Contractors") I get an error that says it can't find the form (ie. Contractors). Also, if I eliminate "[Contractors]" the error says it can't find "Employees Trained List subform":
Forms![Contractors]![Employees Trained List subform].Form!lblThisYearTrainedDate.Caption = Year(Now()) + 1 & " Trained"
Any ideas on how to fix? Thanks

View 2 Replies View Related

Referencing The Controls On A Subform...

Feb 16, 2007

Hello,

I need some help with a piece of code for a db.

This code checks to see if the last three characters on a ControlSource.Tag property are "Req" and if they are, tests if it's null or = 0 and if it is then it outputs a msg box stating that the control.ControlSource is required. It does it for every control on the main form.

This has worked.

Now, i need to allow for multiple subforms to be located on the main form along with their controls being tested as well. I want to start another loop for each time the conrol on the mainform is a subform.

I have that done so far by using "If TypeOf ctl Is SubForm Then..."

This is the part i need help with. I want to search all of the controls on the subform when it is a subform. I need to search all of the controls on the subform then, and i'm not quite sure of the syntax.

I've tried various somethings like SUBFORMCONTROL.Controls but that hasn't seemed to work...

If someone could help me, that would be wonderful!

View 4 Replies View Related

Referencing Another Table Via Drop Down

Jan 11, 2007

Hi all,

have used the wizard to take values for a table dropdown field from another table

the table has

surname forename and class all of which reside in another table... ive tried to set up the bound columns so when you select a surname from the drop down the other two fileds also referencing that 6able are automatically filled in with their corresponding values.

so if the ref table had

smith john 1m

by selecting smith in the new tables drop down, the forename and class fields automatically select the corresponding values from the ref table..

im sure this is possible but cant get it to work and cant find anything on the web (although this is probably down to not knoing the right search string)

any ideas?

dubs

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved