Forms :: Change To Forms Property Causes Fetching Different Records

May 5, 2013

I have a form that launches a query. The results are displayed in a continuous form called ParentForm. On the ParentForm is a combobox which selects a singleform called a ChildForm that displays the details of the selected record. I placed a command button on the ChildForm. This button simulates a circular triple state toggle switch. By clicking this switch the form goes from ReadOnly to Edit to Add modes. The form properties AllowEdits , Allow Additions and DataEntry are adjusted accordingly. These properties when they are changed seem to initiate requery of the underlying data source. Here is the code. I am looking for a way to avoid requery of the data when the mod is changed.

Code:
Private Sub ModeBt_Click()
'-------------------------------------------------------------------------------
' Circular toggle button to change display mode of the form
' ReadOnly - Edit - Add
'-------------------------------------------------------------------------------
Select Case Me.Mode
Case "Edit Mode"
Me.AllowEdits = False

[code]....

View Replies


ADVERTISEMENT

Fetching A Reports Description Property

Jul 5, 2005

I have list box of reports in a form and when selected i want to write the reports description propterty to a textbox.

I modified an example i found posted someplace (can't recall where) and it worked great - just like this (see below).

Then I put it into another database (exact same tables, form and and queries) and if there is a description in the query property it will always give me the error "Type mismatch".

Why?
The only difference I can see is that the working example db had the following References selected:
Visual Basic For Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Oject Library
... in that order.

My database where it is not working has selected:
Visual Basic For Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Microsoft DAO 3.6 Object Library

Is there a better way to fetch this property?
Or is there a setting I need to change - keeping in mind that changing these settings may cause the rest of my db to fail now...

Thanks A lot for any help you can give.




Function ReportDescription(ReportName As Variant) As String
On Error GoTo Err_ReportDescription
Dim db As Database
Dim con As Container
Dim doc As Document
Dim prp As Property
Set db = CurrentDb()
Set con = db.Containers("Reports")
Set doc = con.Documents(ReportName)
Set prp = doc.Properties("description")

ReportDescription = prp.Value
Exit_ReportDescription:
Exit Function

Err_ReportDescription:
If Err.Number = 3270 Then
ReportDescription = "There is no description for this Report"
Resume Exit_ReportDescription
Else
MsgBox Err.Description
Resume Exit_ReportDescription
End If
End Function

Private Sub lstReports_Click()
Me!txtReportDesc = ReportDescription("rpt" & Me!lstReports)
'Me!txtReportDesc = ReportDescription(Me!lstReports)
End Sub

View 1 Replies View Related

Forms :: Property Selection Change - Event Procedure?

Aug 16, 2013

when the Form Property "selectionchange" kicks in?I am trying to use this to run an event procedure. I have a sub form datasheet which contains a date, and when the selection is changed from one record to another in the sub form, I would like to run an event procedure that updates certain fields on the main form, according to the date.I have put msgbox in the event procedure, but it doesn't trigger when the selection is changed? or am I misunderstanding the property?I have also tried got focus, lostfocus, beforeupdate, but they only trigger when the record is changed, not just when the selection is changed.

View 4 Replies View Related

I Need To Change The Enabled Property After Changing Records

Nov 23, 2005

Hi Guys,

i have a problem i hope some one can help me with.

i have a form with a sub form on it, and i want to disable everything until the user clicks a 'edit' button to allow the information to be changed.

i am just testing it at the moment, so i set one text box's enabled property to false. then i added a button with an on click event with the following code:

Me!userid.Enabled = True

when i start the form, the userid box is disabled and when i click on the edit button, it enables it fine.

however, when i change to the next record, the userid box remains enabled. i cant find where to put the code to set it back to false everytime i change the record.

i should also let you know i am a beginner, so please be gentle!

View 2 Replies View Related

Forms :: Default Property / Using A Control Of Main Form Without Using Names Of Forms?

Nov 8, 2013

In the default property of a subform control I want to use a control of the main form without using names of forms, but using me and parent.

I used in default property of cboVATDetail: =Me.Parent!cboVAT, but it is not accepted. My aim is to use cboVAT of parent as default in cboVATDetail of child.

View 3 Replies View Related

Forms :: Change A Field For All Records In Filtered Subform

Aug 3, 2015

I am currently developing a crude Contact manager database and need a quick way of entering data into a selection of records (around 1000 at a time). At the moment I am manually going through all records and changing the "DateLastEmail" field manually, which can be very tiring.

Any way to assign a button to change the field for all records to today's date or something of the like.

Currently I have a form which filters my subform. The subform resides as a seperate query and when the "Apply Filter" button is pressed it requeries with a change of .filter property, so I guess that all that needs to be done is to change all records that exist within the query, but I am stuck on a way to do this without manually entering it.

View 3 Replies View Related

Forms :: Change Query To Look At Same Tables On SQL Database / Cannot Add Records

Jun 24, 2014

I am running access 2007 in Win7. I have a time sheet application that I wrote many years ago. Within same I have a button to press to open a new form to enter time sheet data. The data for the form comes from a query that links Employee and the Timesheet history data file.In an effort to upgrade and make the application more portable and available to multiple users, I decided to migrate the data tables to a Microsoft SQL 2012 database. Various Access reports based on the SQL database run ok. But if I try to open a form to add a new record I get the following error message:-
"Run-Time Error '2105' You can't go to the specified record."

If I debug the error it shows:-
Private Sub
Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub

In an effort to make sure the original time sheet form load worked ok on the original tables, I changed the query to feed off tables in the local Access program and have no issues. It works perfectly. Also if I open the Timesheet Query that feeds the form I can add new records.However if I change the Query to look at the same tables on the SQL database I cannot add records. I can search all records from first to last but not add a record into the query. The add record arrow is greyed out on the query results.

View 5 Replies View Related

Forms :: Search Field - Subform Does Not Change To Show Matching Records

May 6, 2013

All. using 2010. I have a form and a subform. my master and child links are set but when I scroll thru my form; my subform does not change to show the matching records. I do have an unbound search field for the same field as the master and child links. When I type in the search field for a record; the subform does change to that particular record. Do you think that has anything to do with it?

View 1 Replies View Related

Forms :: Change Records Source And Run Query - Onclick Event Of Command Button

Apr 8, 2013

I have a tabbed form in a navigation form with a chart on it. The records source of the chart is a query. The query runs when you click the tab and takes a long time. I changed the Row Source of chart to "" and that eliminates the query running on form load. I've read many posts on changing that row source when a command button is clicked. I tried

Code:
Me!Suspend_Trending_Dashboard![chart].RecordSource = suspend_trend_CHART

in the onclick event of the command button. This doesn't work. I've tried many variations of the syntax. I don't know if I have to tell the query to run after the row source is changed.

On a side note, the query criteria is based on beginning and end dates entered into text boxes on the form. This all works if the query loads when the form is opened.

View 6 Replies View Related

Forms :: How To Use Tag Property

Dec 15, 2014

I have seen someone's database that had tiny circles containing a "?" which, when clicked, opened up a sentence or two. A search for "Tag" on this site strikes out, also.I am hoping to place these little links near fields that may need more explanation. In the ones I have seen before, the little explanation field that popped up disappeared as soon as the focus went elsewhere without the user having to close it. I have succeeded in using the tag property to open a true popup form, but this is clunkier than I want--would just like to learn how to do the other.

View 4 Replies View Related

Forms :: Combo Box Default Value Property

May 22, 2013

I have a combo box that takes it's data from a table called tblFruitBasket. What code do I put in the Default Value property such that the default value is the fifth element (or say fifth row) of field [Fruit] of table tblFruitBasket?

View 2 Replies View Related

Forms :: How To Check For TOP Property Of Form

May 25, 2015

I've saved a form to an text file to investigate a corrupted form issue. The output text file has below extracted text. I am wondering where I can find the TOP, RIGHT BOTTOM property of the form in design time? I could see some properties such as GridX, GridY, but not sure where are TOP property.

Version =20
VersionRequired =20
Checksum =-1566200859
Begin Form
RecordSelectors = NotDefault

[Code] ....

View 3 Replies View Related

Forms :: Set Decimal Place Property Of A Text Box To 2

Mar 9, 2013

I have set the decimal place property of a text box to 2. Then when i run a query that puts data in that box, the deci places are still well over 2..It lokks to be over riding it, how do I stop this?

View 4 Replies View Related

Forms :: How To Keep Subform Filter Property From Turning On

Dec 23, 2013

This doesn't happen on all my other Frm/subfrms that I have. Only this one and I can't figure out why.

I have a main form with a datasheet subform and a detail subform on it. The detail subform works fine until I filter on the datasheet.

Both forms use the same view.

But, when I filter on the datasheet form, the filter on the bottom of the 2nd subform turns on and I can't unfilter it. I can't figure out what it's trying to filter. If I can figure out how this is happening, I can prevent it and then the subform will just reflect the record selected from the datasheet. This doesn't happen with any other datasheet/detail form that I have.

View 1 Replies View Related

Forms :: WHERE In A Control Source Property Of Button

Mar 5, 2015

Is it possible to use WHERE in the Control Source property of a button on a form?

Something like this

= [Station Status]![Done] WHERE [station Status]![ID] = "28"

View 6 Replies View Related

Forms :: Property List In Datasheet View?

Jul 4, 2014

I want to avoid the properties list to pop out when a form is viewed in dsview. I remember there was a property to set that but I cannot find it.

View 3 Replies View Related

Forms :: Property Pane Refuses To Show?

Mar 2, 2015

Using Win 7 32 bit Access 2010 32 bit, I can't get the property pane to open. Right-clicking the form or any of the controls and selecting Properties or Form Properties doesn't do a thing. How can I get the property pane to open.

View 6 Replies View Related

How Do I Change Data In Property Mode

Nov 11, 2004

I have created a form in access 2000. I now want to change the table that this form uses. Normally I would just click the properties tab and then select data, a list of all tables would come up and I would choose the correct table. For some reason I cannot access the data tab. The other four tabs are all availabe, but not the data tab. It is like the data is locked or something. I have clicked on properties on my desktop icon and it is not locked. Please help.

Photoone

View 1 Replies View Related

Forms :: Change Button Color After Data Change

Apr 5, 2014

I am trying to change the button color on a subform if a related form data changes.Main form is products with a continuous subform with serial numbers of products i.e, serial number, location, price and a button to add addtional issues if there are any for this particular serial number (this will open up another form related to the serial number so I can add an issues if there are any).The reason I would like the button to be a different color is so I can quickly see if there are any additional notes been added to the serial number. Just in case you may ask why not add the field to the continuos form is that the issues and be quite lengthy and there may be lots of serial numbers on the form

2346 location warehouse price 29.99 (button - green)
2347 location shop price 29.99 (button - red)

View 1 Replies View Related

2007 Upgrade - Change Subdatasheet Property??

May 30, 2007

We just upgraded to Office 2007 and are experiencing very slow access performance. This microsoft article addresses the problem:

http://support.microsoft.com/kb/275085

It won't let me change Subdatasheet Name property to [NONE].

Even if I am able to change it, will this affect my table links. I have a lot of them.

I am just the part-time Access "programmer" here and am somewhat lost trying to figure this out. Does anyone have a simple explanation and solution? I would appreciate any help so much!!

View 1 Replies View Related

Dynamically Change SourceDatabase Property Of A Query

Feb 7, 2008

Access 2003:

I have a query (qryGetRemoteStuff) like this:SELECT * FROM Table1 IN 'k:projectssomedatabase.mdb'I have several databases where i use this technique. I don't want to link these tables to my database.
According to the properties list, "Source Database" is used to store this path to my remote database.
So far so good.
When the path changes i am in a lot of trouble, that is why i want to change the path of this query dynamically. I don't seem able to change this property.

Is this possible? How?

Immediate window:
?currentdb.QueryDefs("qryGetRemoteStuff").Properties("SourceDatabase")Returns "Property not found". Access help F1 doesn't provide me with a workable example.

View 2 Replies View Related

General :: Can't Change Required Field Property

Jul 16, 2013

I am trying to change a field to be required. I know where it is...

(Navigation Pane > Design View > Select field I want required > Properties Pane > General Tab > set Required property to Yes)

But I don't see that General Tab at the bottom of my page.

The closest thing I have to properties is on the right-hand side. It opens when I right-click, then hit Properties. It displays...

Format | Data | Event | Other | All... but that's it...

[URL]

View 4 Replies View Related

Forms :: Full Info For All Property Options Of Any Form Control

Jun 26, 2015

How to set all controls in the form I would like to get complete information about all property options.

View 6 Replies View Related

Forms :: Set Form Property To Window In Database Set To Use Tabbed Documents

Oct 16, 2013

I'm using access 2010.

How to set a single form's property to act as it's own "overlapping window" in a database that is set to use tabbed documents. I want most windows to have the tabbed layout but there are a few that I would like to have pop out and be their own windows.

I noticed that the Northwind database did this somehow. if you click on one of the products from the home screen a form pops up in its own window. I tried reverse engineering it, but no luck so far.

View 2 Replies View Related

Tables :: Change Table Field Property Programmatically

Apr 23, 2014

I am using Access 2010. How to change the property of a field in a table programmatically.

I have a table in which one field has Required property set to "Yes". I would like to set this property by using VBA code to "No", then add data into a table using a query and re-set the Required property to "Yes".

Is this possible and if so, how can I do it?

View 6 Replies View Related

Modules & VBA :: Change Default View Property Of Subform

Feb 26, 2014

I have a form with a subform where I want to select (via button) which format to open the form in. Opening the form is simple, DoCmd.OpenForm (FormName),acFormDS to open in datasheet, however, the subform opens in default view (single form). Can you programmatically set the property on the subform to change the Default View from Single Form to Datasheet and back?

View 3 Replies View Related







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