Forms :: Retrieve Tabindex From Active Subform

Apr 19, 2013

I have a form with 20 identical subforms.

Is it possible to retrieve the tabindex from the active subform in the main form by using VBA?

View Replies


ADVERTISEMENT

How Can I Get The Name Of The Active Subform

May 23, 2005

I am trying to get the name of the active subform in an Access database from VBA code.

If i use screen.activeform i get the name of the parent form and not the subform.

Any ideas how to get this ?

Many thanks in advance.

Andrew

View 5 Replies View Related

Active X Error On Subform

Feb 13, 2006

Hi all,

I have a form with two sub forms and when I enter data into one of my subforms I get this error?


A Problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.

Close the OLE server and restart it outside of Microsoft Access. Then try the original operation again in Microsoft Access.


I've checked the relationship and linked child / master fields and it looks ok. Does anyone know what could be causing this?

I am getting this error on a couple of different PC's running WinNT4 and Win2000.

Shutting down doesn't help and I don't get this with other databases. When I open the form (subform2) on its own I can enter data, just not when it's part of the main form?

View 1 Replies View Related

Modules & VBA :: Creating New Record Within Subform - Cannot Navigate To Other Active Records

May 4, 2015

I have a main form that controls 2 subforms. sbfActiveProjects displays a list of records that have not been flagged as complete. Upon clicking on a record in sbfActiveProjects, the details of that record show up in sbfProject. This functionality works great, except when I try to create a new record. The code works fine for getting a new record, however once I run the command I lose my ability to navigate to other active records.

Code:
Private Sub cmdNewProject_Click()
'set focus to sbfProject
sbfProject.SetFocus
'navigate to new record
DoCmd.GoToRecord , "", acNewRec
End Sub

View 2 Replies View Related

How To Programmatically Enter/retrieve/modify A Form With A Subform In An Unbound

Apr 14, 2005

Pls. help!!!, the attached document is the application I want to programmatically control the data entry:

1.) Parent Form is unbounded fields, and set a record source in my table "BidTabTransaction". If I want to retrieve record, I just populate the table by querydef and sql into recordset and put all the table fields into form fields. The same thing if I want to save the record, and edit the record in the form.

2.) My problem is the child form. I set a record source in my table "BidTab Details". I set the child form to allowaddition=Yes; data entry=No;Allowdeletion=No;AllowEdits=No then it just simply display the records which is equal to Bid Tab No. because it is bounded the form fields into record source fields of "BidTabDetails" Table.

How could I retrieve a record from parent form and display the details in the child form in both unbounded form fields? (FrmBidTabTransaction & FrmBidTabDetails)

I would be grateful if someone out there attends immediately with my problem because I am in deadlock deadline to submit at least a partial running application. Thank you for your kindness...

Will be waiting. You can email me at jrb_ph@yahoo.com. God Bless!!!

Sincerely,
Rody

Ps. I created this using MS ACCESS 2003.

View 2 Replies View Related

Forms :: How To Retrieve First Name

Oct 13, 2014

I am able to get the user name of the computer using a function. The function returns the user name in this format: first Name.last name. I wish to display only the first name ( the name before the dot. ) in a text box. I think I can use the len function. How to retrieve only the first name. I also wish to capitalize the first letter.

View 2 Replies View Related

Print Records From Active Forms

Mar 22, 2006

Hello, I have a problem with my database and need some help.

My database has a main menu named MENU which allows to access all the different forms of the program I am trying to develop. One of these forms is named MASTER and has its source to the main table of my db also named MASTER. To open the form and add a new recorset I simple press a button to which I have associate the following simple code:

DoCmd.OpenForm ("Master")
DoCmd.GoToRecord , , acNewRec

Once in the form and add the data I have to close it so that it can be saved. I then go back to the MENU form and use a listbox to open the selected record. The listbox its based on a query of table MASTER and has a criteria (SSN) that allows me to open the record with the double click event.

My problem is that I need to append my data into different tables and do not know a method which would allow me to do this without having first to close the active form (MASTER) and then running the append queries. Is there a way this can be done?

What I am trying to do is:

- Write my data into the active form
- Append my data from the active form into different other tables without having to close the form
- Still have my active form opened in my database so that I can open another form (CHILD).

Please note that after that I have closed the form, I am currently using this code to append the Master Table to the other tables:

If Not IsNull(DLookup("[SSN]", "child", "[SSN] = '" & Me!SSN & "'")) Then
Forms("MENU").Visible = False
Else
If IsNull(DLookup("[SSN]", "child", "[SSN] = '" & Me!SSN & "'")) Then
DoCmd.OpenQuery ("AppendChild")
End If
End If
DoCmd.OpenForm ("Child")

This avoids having to save twice the same data.
Can anyone help me on this?

Thanks.

View 4 Replies View Related

Forms :: Form Active And Inactive Field

Aug 18, 2015

Field "A" is the drop list to select data like (Yes, No)

Field "B" is inactive but turn it to active when the field "A" is select to "Yes".

View 1 Replies View Related

Forms :: Format A Form When A Filter Is Active

Mar 13, 2015

I have a database with a filter on the form which users can apply I know at the bottom of the form it highlights it as filtered but I want something a bit more prominent displayed on the form when a filter is active.

View 5 Replies View Related

Forms :: Display Contents Of Active Cell

Mar 2, 2014

I'm trying to have a cell display the information from which ever cell the cursors is on.

I am trying to use (Master Info / Child info) for a subform but would like the Master cell link to where ever the cursor is.

Is this even possible?

View 10 Replies View Related

Forms :: Disable Other Navigation Buttons Tab When One Tab Is Active

Jul 26, 2015

I have few forms for which I have created a navigation form. Now in this navigation form, I have 4 tabs/ forms. I want to disable other 3 tabs/ forms when either of the one is active. I want to restrict user from switching the tab leaving the task incomplete in one tab.

It should show a popup msg, that "the task is active. Please submit before leaving the page."

View 1 Replies View Related

Forms :: Unable To Retrieve Right Value From Form

Jul 10, 2013

I have a table, form and a query

Table structure

Project Name , Description , teamA(Yes/No Box), teamB (Yes/No Box), teamC (Yes/No Box)

Form namely search project by team
show three Yes /No box for selection

query

SELECT Projects.[Project Name],
Projects.[Project Description], Projects.[Project Category], Projects.[Start
Date], Projects.[Est Completion Date], Projects.[End Date], Projects.[Project
Benefits/ Impact], Projects.[IT Resource], Projects.[Key Participant], Projects.[Last Update/Comments],
Projects.[Action Owners], Projects.Status, Projects.Activity,

FROM Projects

WHERE (((Projects.[TeamA])=[Forms]![Search Project by Team]![TeamA]) AND ((Projects.[TeamB])=[Forms]![Search Project by Team]![TeamB]) AND ((Projects.[TeamC ])=[Forms]![Search Project by Team]![TeamC]))

View 5 Replies View Related

Forms :: Finding Previous Active Control On A Form

Mar 2, 2015

I have a form where the user clicks a button (button 1) to open a modal form, the user then enters data into this form and clicks close.

Then back in the first form I need to find which control had focus before (button 1) was clicked.

Screen.PreviousControl returns a control on the modal form.

I hope its easy like Forms!FirstForm.PreviousControl but I can't seem to find it!

View 2 Replies View Related

Forms :: On Click Event To Print Active Record?

Jul 21, 2014

I have created a form to select multiple records for a transmittal report. I added a button to the form which I would like to open the report to view the current record. In the On Click event I added the following code:

Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[TransmittalID] = """ & Me.[TBLTransmittal.TransmittalID] & """"
DoCmd.OpenReport "RPTDwgTransmittal", acViewPreview, , strWhere
End If
End Sub

The debugger keeps highlighting the row above shown in red. I've used this same code before on other forms and it worked but not sure why it isn't working this time. The only difference with this form and previous ones is that this form contains a multiple values combo checkbox (hope that's the correct term). The query that the report is based on changed the names of the field names so that TransmittalID on the form is TBLTransmittal.TransmittalID in the query.

I've tried the code with and without the extended name but each time the "Do.Cmd..." is highlighted.

View 11 Replies View Related

Forms :: Retrieve Records Based On Combobox

Jun 25, 2013

I have two Tables, "staff data" (staffID, name) and "issues log" (IssueID, StaffID, 20+ fields about individual Issues). StaffIDs are linked together so each employee can have multiple issues..I have (so far) Form1 containing individual Issues that can be filled in, or retrieved one at a time / scrolled through in IssueID order

What I want is a second form, containing a combobox with all StaffIDs (+ names) listed; when a StaffID is selected, a table is loaded containing all Issues for that employee. When any of these is selected, Form1 is loaded

I have created the second form, including the combo that contains both StaffIDs and Names. I can't yet grasp how to show the set of Issues applicable to that employee when I change that combo...If I could have the combo on Form.

View 2 Replies View Related

Forms :: Retrieve / Save And Update Data?

Apr 26, 2013

MS Access 2007. I am trying to make a form.

Form2

Text0 = Textfield for ID
Text2 = Textfield for LName
Text3 = Textfield for FName

btnRet = Button for retrieve when ID is entered in Text0
btnUpdate = Button for saving the changes made in the textfields.

How can I search the ID from the Table I made? And when it was matched, get the details of that ID unto the designated text fields. It was like retrieving the data from the table with the ID typed in the text field from the form I made.

Then when it was retrieved, I can edit the fields and when I hit the Update button, the edited fields will replaced the original data.

Also after it was updated, a new record will be added in the history table that the ID was edited. Is is possible?

For now, i want to know how to retrieve the data with the ID and edit and save it after and update the table. Does it applies with the codes with the retrieve button and update button?

View 5 Replies View Related

Forms :: How To Retrieve Value From Last Saved Record On Textbox

Aug 8, 2013

I'm working on a "Product Details" form somewhat similar to form in northwind, which the record source in "Products" table. what i'm trying to do is after clicking "save and new" command button to go to new record in form, i would like all text boxes to automatically retrieve the value from last saved record set as default value.

after google searching this subject i found the LastModified Syntax but i just don't understand whether i use it in VB or marco, or even how to implicate this. Should I make macro on each txtbox or should i create module? if i have to create either macro or module.

View 5 Replies View Related

Forms :: List Box Retrieve Image As Per Selection

Aug 31, 2013

i want to see the product image in my database as per my selection from listbox in "frm_MainForm" but it shows error no 2220. database file is attached.

It does show the image when i add it to the form "frm_PruductMaster" and search in "frm_MainForm" but only until i restart application. after restarting application it again shows error 2220. But it shows image name in the error. (i have tried with .bmp and .jpg as well).

View 11 Replies View Related

Forms :: Sort Values / Text Based On Active Field

Feb 5, 2014

In a form is there a way to change sort order based on which field is active?

I'm using a Split Form which gives me the ability to sort by clicking on the header name ans selecting sort. This slowing things done since my workload is heavy.

View 3 Replies View Related

Forms :: Access 2010 / How To Retrieve The New ID During Filling The Form

Sep 23, 2013

Access 2010 frontend, SQL-Server 2008 R2 backend

During filling a form, I generate a code which should include the ID of this record.

But the ID is not available before update of the form.

If I save the record before all fields mandatory are filled, i get an error of course.

How can I manage this and get the ID "earlier"?

View 3 Replies View Related

Forms :: Enter The Docket Number To Retrieve Customer Information?

Mar 12, 2014

I am working on a database for a Skip Delivery Company, I have all relevant tables and Forms done and can add customers and so on. I have a field name in my Skips Delivered table called Delivery Docket which contains a long list of customer dockets. What i want to do is, be able to retrieve all customer information (such as Customer Name, County, Location, Phone Number and so on ...) on my Skips Delivered form by just entering the docket number on that form. I'm thinking i need an SQL Statement somewhere?

View 2 Replies View Related

Forms :: Retrieve Combobox Text In Email Body Of Outlook?

Apr 26, 2015

I am trying to fetch combobox dropdown text (in the networks label ) into the email body but in vain.

Me.cmb_Network_1_data.Text is giving the RowID instead of the text inside the combobox.

Whichever networks are selected in the six dropdowns should go to email body as you can find in the attachement

Code:
Sub update()
Dim oOutlook As Outlook.Application
Dim oEmailitem As MailItem

[Code]....

View 2 Replies View Related

Forms :: Retrieve Info From Another Query - Higher Column Numbers?

Aug 22, 2014

When I attempt to use the me.field = me.combobox.column() method to retrieve info from another query,it only works if I use column 0 or 1... it doesn't work with higher columns number.

- field name: cbofi
- row source: listado-unico-fi <-- it is a query with unique values and 7 fields in total
- event procedure, change:

Private Sub cbofi_Change()
Me.txtDOCTPT = Me.cboFI.Column(1)
Me.campovia = Me.cboFI.Column(5)
End Sub

- txtDOCTPT is the field that indeed works
- campovia is the one that does not work

I tried using column(0) and column(1) and it worked fine... but higher column numbers do not work. Just mentioning because the field names are all right.

View 3 Replies View Related

Forms :: Refresh Pivot Chart In Subform After Changing The SQL Of The Subform's Query?

Sep 16, 2014

I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.

There are three subforms on the form, all pivot charts, all based on the query being changed.

The goal would be to update all three according to the user-given parameters.

Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.

I've also tried to requery and refresh them, with no result.

Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.

View 7 Replies View Related

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Forms :: Calculate Subtotal On Subform And Display On Upper Subform

Jun 20, 2013

im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this

tblCustomer
- tblOrders
- tblItems

and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this

frmCustomers
- sFrmCustomerItems
- sFrmCustomerOrders

i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.

View 5 Replies View Related







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