Noob With Textbox And Subform/subreport Problems

Aug 4, 2005

I am making a from that has a set of combo boxes that allow the user to search through a table. the results are displayed in a subform / subreport window that is set to a query. the search works by changing the SQL of the query. I have spent weeks on getting this far and i have decided to just show some key infomation in the subreport window.

What i want to do now is to display further infomation from the query row that is selected by the user in a textbox on the form.

i have been looking in the access VBA help,an access programming book and in the forum .And found that it is something to do with the recordset and making the text box bound but i cant find any examples where it is applied in this way.

the problem is (i think) that i would like the text box data to change when the user selects differnt rows so would this change what the textbox is bound to. :confused:

I hope it is possible and if anyone can help it will be greatfully recived

Trees

View Replies


ADVERTISEMENT

Noob ? - How To Create Unbound Subform?

Feb 19, 2005

How do i create an unbound subform on an unbound form? I want to bring data in from another table/query if the data exists.

I am pullind residential property data, if there are recent sales i would like to pull that too.

I know this is a pretty broad question, but any help would be appreiciated, exmaples would be awsome to. Thanks.

View 1 Replies View Related

Forms :: Update Unbound Textbox In Main Form From Subform Textbox Afterupdate

Apr 17, 2015

How to update unbound textbox on main form from unbound textbox in subform afterupdate.

that is when amount paid is updated it automatically updates total paid, balance etc.

View 2 Replies View Related

Reports :: Syncing Current Subform To Subreport

Aug 12, 2014

I am trying to send the current record and the current subform record to Reports for printing.Each record on the Form can have multiple records in the subform, however I only want to print the Main Form and the Current subform.Form / subform are linked on EquipID and EquipIDfk and are working correctly.Report / subreport are linked the same way and work correctly.When I try to use the DoCmd.OpenReport... It is printing the data from the main form plus all subform records related to the main record.I have tried the following Sub to filter the subreport without success.

Private Sub cmdPrintRecord_Click()
Dim strWhere As String
Dim strLook1 As String
Dim strLook2 As String
strLook1 = Me![EquipID]
strLook2 = Me![subfrmInspectionReport].Form![InspectionFindingspk]

[code]...

Using Debug strLook1 and strLook2 both show they have the correct relevant record numbers and the value stored in strWhere is: [EquipID] = 745 And Reports![RptPrintRecord]![subrptInspectionReport].Report![InspectionFindingspk] = 8. This only prints an empty report. It seems that when I try to reference the subreport it goes pear shaped.

View 5 Replies View Related

Subform/ Subreport Query Data Row Number Reference

Jul 20, 2005

I am new to this and i may be going about this the wrong way but what i am doing seems to do the job until now.

I am making a form that has a combo box, a few text boxes and a subform subreport on it.

The idea is that the first thing a user does is to select a name form the combo box. this name is then stored as a sring and used to set the forms record source and then the subform's (called window) source object. the string is slightly modified during the process to do this. That part works fine.

The problem arose when i included text boxes to show infomation from the selected Query thatisant show in the window (subform).

After the user selects a name and the name is used to set up the record source and the source object for the text boxes.it then displays in the text boxes the records extra data. however it only displays the first row extra data.And when other rows in the query table are selected the data in the text box stays set as the first row.


I know that this is because i haven't programed in an event that makes the text box data update when the user selects a new row.

i also realise that i would need to have some way of know what row of the quiery table the user is looking at to be able to update the text boxes.

my questions are

Is there a way to tell what row of a query table in the subform is selected ?

Is there an event similar to on selection of row or something like that that i could use to reload the text boxes?

and finaly

am i going about this the right way?

Any input on this would be greatly appreciated :)

View 5 Replies View Related

Modules & VBA :: How To Reference A Textbox In Subform

Jul 16, 2013

reference a text box in sub form. I did the same thing for the combo box in it worked perfect. I am not sure why this is not working for textbox.

This is how I referenced it:

[Forms]![MainOrderForm]![CuttingNumForm].[Form]![Style1]
Form: MainOrderForm
Sub Form: CuttingNumForm
Text Box: Style1

I should also mention that "Style1" filed in automatically once a "CuttingNum" field is selected.

View 8 Replies View Related

Queries :: Textbox On Subform As Query Criteria

Jun 3, 2013

I'm trying to build a query to use as a filter in the DoCmd.OpenForm function.

I have done this several times before, referencing values from forms e.g.

Point To
Field: LeadID
Table: Lead
Criteria: [Forms]![GridDisplay1]![LeadID]

This filter is used in the procedure:

Code : DoCmd.OpenForm "LeadDetails", acNormal, Point_To", , , acDialog, """"

And it works great, I click a button next to the record I want to select (records displayed on continuous form) and it opens the Lead Details form on that particular record.

However now I am trying to accomplish the same thing, except instead of a continuous form I need to draw from a continuous sub-form. The form "BrokerMgmt" contains a sub-form named "BrokerSearch." The RecordSource for the sub-form is set once the user enters data into a few textboxes on the main form and clicks the search button:

Code:
Private Sub brkSearch_Click()
Dim argCount As Integer
On Error GoTo Err_Handler
If IsNull(brkFirstName.Value) And IsNull(brkLastName.Value) And IsNull(brkCompany.Value) Then
MsgBox "You Need To Select Some Values", vbCritical, "Lead Tracking"

[Code] ....

The sub-form then displays basic info such as Name, Company, State, and the "BrokerID" which is the primary key of the "Broker" table. This "BrokerID" is displayed in "Textbox 20" so I set a button next to each result to on_click perform the procedure:

Code:
DoCmd.OpenForm "BrokerDetails", acNormal, "Point_To_Broker2", , , acDialog, """"
"Point_To_Broker2" is set up in the same style as "Point_To":
Field: BrokerID
Table: Broker
Criteria: [Forms]![BrokerSearch]![Text20]

However instead of the BrokerDetails form opening to the appropriate record I get a msg box asking for a parameter. Why is this? Even if I enter the correct BrokerID as the parameter it still gives me an error saying you can't go to the specified record.

View 11 Replies View Related

Disable Textbox On Main Form From Button On Subform

Jun 23, 2005

My subform when i click the New record button on the subform i want it to disable a text box that is on the main form.


Me.Pensioners.Form!quicksearch.Enabled = False

where Pensioners is the name of the Parent Form. Thhis isnt working for one reason or another. Please advise.

View 3 Replies View Related

Modules & VBA :: Update Subform To Unbound Textbox Value Change

Aug 4, 2015

As the unbound parent list box record selection is changed, I want the sub form to refresh. Do I put code in the Subform Current Record event?

Master Form Name: frmsr_NewWellEntry
Unbound Listbox - when record selected the primary key populates txtNavWellID (unbound) on parent form

subform Container fsubsrNavSHLBHL Link Master Fields =Forms![frmsr_NewWellEntry].[txtNavWellID]

The read-only form in the subform Record Source is something like: select * from vsrNavigatorSHLBHL where Well_ID =90243..Key The Form used as the subform above will be re-used in multiple parent forms. The parent form data is form SQL Server, the subform from Oracle.

View 4 Replies View Related

Forms :: Using Textbox In Form To Update Subform Table

May 2, 2015

I'll simplify this form to a

- textbox
- command button
- subform (showing a table with 4 fields, including an "EntryID" field but just one record)

What I'm trying to accomplish is to enter a value in the textbox (this value will be one of the EntryIDs in the EntryID field), click the command button, and the subform should refresh itself, showing the record from the table (the 4 fields) which has the same EntryID.

View 2 Replies View Related

Modules & VBA :: Editing Data From Database In Textbox Taken From Subform

Jul 11, 2013

In my form I have a subform, which displays A, B, C. Then information C is displayed in textbox. User should have a possibility to modify this data in order to modify data in database.

I am able to display information C in text box based on this subform. However it is uneditable, although property of enabled is yes and locked is no.

It seems to me, that it is impossible to edit data because it is taken not directly from database but from sub form, so I make special query which takes data directly from database however I lose an event which is based on selecting proper record from subform (there is only onEnter and onExit events)

View 5 Replies View Related

Forms :: Update Subform With Value From Main Form Textbox

Oct 2, 2014

I have a form called CostingForm. This form has a subform called CostingSubform. The subform's data source is a table called Costing Table. The main form has a combobox that has all the "Field names" or headers from the Costing Table that populates with the on open event. I also have a non bound textbox on the main form. What I would like to be able to do is input a value in the textbox, select a field name from the combobox and with an "update" button update the corresponding fields on the subform with the value in the textbox. Is this even possible?

View 4 Replies View Related

General :: Search Unbound Textbox And Populate Subform

Jun 14, 2012

I have a form with a textbox which when users enter a unique number(barcode) I want to run a query which pics up the barcode number, checks against the product id and fills the subform with the name of the product and price.

The basic details of the product table is like:

product id (Autonumber)
prdoduct name (text)
price
barcodeId (number)

The subform where i want the result to go is the order details fields product name and price.

I am trying to figure out how to do this but my mind keeps going blank, its been a long while since i used ms access.

View 7 Replies View Related

Control Subform Textbox From Master Form Checkbox?

Nov 16, 2014

My bound master form has bound subform in it and both of them has linked fields. In the master form i've placed a checkbox which if unchacked will lock and disable a textbox in the SUBFORM, and if checked will enable and unlock the textbox and fill it with a calculation result, which will then be passed on to the underlying table.

Now, suppose in the master form (named X), i have A (checkbox) and B (textbox with numeric value) and in the subform (named Y), i have C & D (both textboxes with numeric values). Hence if A is checked, I'd like D to return the result of - "B*C". Or else D will remain locked and disabled.

View 12 Replies View Related

Modules & VBA :: Automatically Fill In A Textbox On A Subform On Button Click

May 4, 2014

I have a mainform with a combobox and a button. What i want is when i click on the combobox and then on the button I want that the textbox in the subform automatically fill in.

The mainform name is FrmTakenInvoerenEnToewijzenAanEenMonteur,

The combobox name is Keuzelijst1,

The subform name is SubTakenInvoeren,

And the textbox name is txtOpdrachtnr.

I tried this code in on button click:

Me.SubTakenInvoeren.txtOpdrachtnr = Me.Keuzelijst1

But that doesn't work.

View 7 Replies View Related

Forms :: Blank Textbox When Subform Updates Main Form

May 15, 2014

I have a subform with a textbox in the footer to count[id]. then on my main form i have another textbox that has a control source of =[subform].[form]![subformfootercontrol].

However when the subform updates the main form text is blank. typically i see a ?#Name or#Error if the control is pointing to the wrong place, but i have never see it stay blank.

View 3 Replies View Related

General :: Highlight Subform Textbox Border Color On Focus

Nov 19, 2014

I am trying to highligh a subform textbox a yellow color on focus. However it is highlighting every textbox in that field as it is a continuous form therefore they are all named ThisCount.

Is there a way to highlight just the specific textbox that I am in. I have tried.

Code:
Me.ThisCount.BorderColor =RGB(255, 215, 0) 'gold
Me.ThisCount.BorderWidth =3

and tried

Code:
Dim ctlCurrentControl As Control
Dim strControlName As String
Set ctlCurrentControl = Screen.ActiveControl
strControlName = ctlCurrentControl.Name
Set ctlCurrentControl = Screen.ActiveControl

ctlCurrentControl.BorderColor = RGB(255, 215, 0) 'gold
ctlCurrentControl.BorderWidth = 3

View 8 Replies View Related

Forms :: Textbox On Main Form Referring To Subform Control

Aug 14, 2014

I have a form with a subform which resides in a tabbed control. In that subform, I have a textbox in the footer that sums values in the detail section of the subform.

I have a textbox on my main form that should display the same data that is in my subform footer textbox, but it is giving me the #name? error.

This is the expression in my subform footer textbox (which returns the correct result):

TxtSubtotalHQPCalc -
=Sum([ActualHQPCalc])

And the expression in my main form textbox (which returns #name?):

txtActualHQPValue -
=([subfrmHQPProject].[Form]![TxtSubtotalHQPCalc])

I have verified that my subform name and textbox names are all accurate. This is very frustrating because I am using this exact same method in a different database with no problems!

View 3 Replies View Related

Forms :: Clicking Checkbox On A Subform To Pull Data From Textbox On Mainform

Nov 25, 2014

I have a Mainform [FrmReconcileMain] and it contains a Subform [FrmReconcilesub]

What I'm trying to is, on the Main form type in a statement date in textbox [TxtStatementDate].

I have a checkbox on my subform [ReconciledYN], along with a textbox [TxtReconcileDateSub]. when I click the checkbox, it simply pulls the date from the mainform and populates the date in the subform.

I've even tried experimenting on a simple form (with no subform) to see whats going on, but still I can't get it to work, even on a simple event such as this...

If [yourcheckboxname] = -1 Then [controlnametoupdate] = date() Else [controlnametoupdate] = ""

View 13 Replies View Related

Frequent Error In Referring / Linking Textbox In Subform From Text Box Within Main Form

Apr 17, 2013

Go to frmInvoice, and you'll see a Net Total box (txtNetTotal) . It's control source is linked to a textbox in the subform fsubInvoiceDetails2 called txtStocktotal. It basically just pulls up all the costs associated with that InvoiceID.

The reference mechanism is as follows: =[fsubInvoiceDetails2].[Form]![txtStockTotal].Now...sometimes this works and sometimes it doesn't! Sometimes i've had to use: =forms!fsubInvoiceDetails2!txtStockTotal.

It seems to be very temperamental at times and i'm not fully confident if this can be explained.By way of note, I use express builder normally to input these statements: I go to Forms > ALL FORMS > fsubInvoiceDetails2 > txtstocktotal.

View 2 Replies View Related

Please Help A Noob

Jun 7, 2005

Hey everyone,

I currently have an Excel Spreadsheet w/ 20 columns and 800+ rows. The columns are such things as Product, Product Code, Description, etc. It has clearly grown to big for an Excel file so I created an Access table from the spreadsheet called All.

Goal - have employees open a form and select a product from a dropdown box and then place check marks next to the info they would like to see for the product they chose.

I created a seperate table called Product, and a query for table All, and a report for the query. I created a form w/ a combo box that lists table Product and has a submit button. I added a criteria in the query under the column product that looks at this combobox. When you run the form, select a product, and click submit it opens a report that shows the results of the query for that product.

The part I cannot get is the check boxes that determine what columns are show in the report. I added a checkbox to my form and then went to my query and unchecked show and added a criteria to look at the checkbox in my form. All that did was erase the column from the query permanently.

I'm sure I'm going about this is the wrong way, but this is my first hack at Access and I'm trying to learn as I go.

thanks for any suggestions,
-Eric

View 5 Replies View Related

Help For A Noob!

Jan 29, 2006

a a aa a a a a a aa a a a

View 4 Replies View Related

Noob Needs Help

May 27, 2007

I'm a complete newbie to MS Access, and I'm working on my 2nd database.

Just a small and probably retarded issue: I have a table which includes a field, which contains four numbers. In a query I want my users to be able to enter a number, like 6, and the three numbers after that will have to be wildcards.

Example: The field has these entries:
8243
8184
6423

When the user enters "8", it should show the first two records. When the user enters "6", it should show the third record.

How can I accomplish this?

View 7 Replies View Related

Noob Needs Help

Dec 1, 2007

Hi Guys

i have created a table and am trying to run a qry that counts specific data, i have been searching but cannot find the answer. I have a standard qry that has the criteria of "staff name" and dates between ## And ##. Now when that information is returned, how do i get a count figure for the results. So for example if there were 15 entries for september it would say september = 15 (ish). I have been told to assign a recordset but no other information was forth coming. Can anybody help with code or qrys for creating a recordset.

Please remember the noob status when it comes to access - lol

Cheers Guys

Anthony

View 1 Replies View Related

Help A Noob

Feb 1, 2006

I have taken over the Access DB from Hell.....

Recently our system crashed and so I fixed compacted and repaired, and all seemed to be good to go. However, next day a bunch of random fields that our reps were once able to add information to are no longer able to add info to. They seemed to be locked out, however, I go into the various forms that were set up and enable is set to Yes, and Locked = No.

Any ideas?


This also effected a Check box field of 4 also.

Thnx for any help

View 1 Replies View Related

Sorry, Noob Needing Help..

Nov 19, 2006

Hope nobody minds but I don't really know Access and I have a table that needs sorting pretty desperately.I have a table with 5 columns that I need to filter out so just the remaing records are left over.http://img208.imageshack.us/img208/7328/untitled1wb8.th.jpg (http://img208.imageshack.us/my.php?image=untitled1wb8.jpg)The column 'fax' is the column with the records in it and the following columns need the record removing if the box is ticked.TimFPS, OurFPS, OnFPS, NeedsToBeFPS, however the column 'NumberWeHave' I'm not too sure about so I'll ignore it for now (I may need to take them out later)Sorry to be a complete noob and if anyone can help it will be muchos appreciated.

View 2 Replies View Related







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