Forms :: Embedded Macro - If True Go To Control

May 21, 2013

I'm trying to create a simple embedded macro for a checkbox control on a form [Company?]. The default value for this checkbox is No.

I want to write an If statement that basically says "If[Company?] = Yes, then GotoControl[CompanyorNameCombo], Else GotoControl[CustomerFN]

Although the checkbox field label and the control itself IS named [Company?] in the table and set as a Yes/No field, when I try to write the If statement I get an error that says "Microsoft Access cannot find the name 'Company?' you entered in the expression"

That's the name of the control and it is included in the table and shows in the field list.

View Replies


ADVERTISEMENT

Forms :: Number Of Buttons Which Open Other Forms And Filter Results Using Embedded Macro

Apr 6, 2015

I have a bit of a problem with a database in Access 2013. On 1 of the forms, I have a number of buttons which open other forms and filter the results using an embedded macro. All has been well until a few days ago when error 2950 pop up box started appearing. After fiddling around for a while it all works OK (without actually changing anything) until next time the database is opened. I checked to make sure the location is "trusted" and all seems OK.

View 4 Replies View Related

Forms :: Access Form With Tab Control Pages Each With Embedded Forms

Apr 13, 2013

I have an access form with tab control pages each with embedded forms.In one page I have a list of records as a datasheet form with the record identifier field configured as a hyperlink. When I click on this it passes its value to a form field in the form in the following tab page (works without the hyperlink but its a useful way of highlighting which field to click) which is a display/edit form of the details of the individual record. The Subroutine which does this sets the focus on this field it is passing the value to on the other form and the 'On Got Focus' event in that triggers the query that fills the editor form.

When I click back on the following tab to select another record to view/edit, the identifier value of the other record is passed to the other form but the data displayed in the rest form doesn't change. I understand this is because the field with the 'On Got Focus' never lost focus and so the query function was not called. To correct this I tried adding the same function call to the 'On Change' event however this does not work (the field is a text box set to 'locked' if that is relevant).I can get the form to do a new query properly if I click on a different field in the form before going back to the list tab or (as this is removing the focus allowing the On Got Focus to work again) if I click on a button to select a different record (which just takes me back to the list form).

Is there any way I can get this to work without having to manually remove the focus from the problem field? I have tried setting its On Got Focus event to move the focus to another field after the query function call however this prevents the Setfocus line in the code in the previous form from working. Here is a snippet of my code below.This code is for the list form and passes a value to the editing form:

Private Sub SalesID_Click()
Forms!Mainform.Requery
Forms!Mainform!Sales_Admin_Form!Sales_Admin_SalesI D.Value = SalesID.Value
Forms!Mainform!Sales_Admin_Form.SetFocus
Forms!Mainform!Sales_Admin_Form!Sales_Admin_SalesI D.SetFocus

[code]....

View 1 Replies View Related

Forms :: Rich Text Box - Dynamically Populate Control With Embedded Objects At Run Time

Mar 29, 2015

From a info sheet on RTB Using the Add, Clear, and Remove methods, you can dynamically populate the control with embedded objects at run time. Can those 'embedded objects' be controls, e.g. list boxes, labels etc ?

View 3 Replies View Related

Reports :: How To Show Picture On Report If Control Is True

May 28, 2014

I have a report called "orders" and on this is records for orders of the day inputted.

On this report I have a control called "urgent" and a picture called "UrgentPicture" with the picture set to visible.false?

If any of the controls for Urgent is True then this will show my image, but this is not happening?

I am using this in the current event on the report

If Me.Urgent = True Then
Me.UrgentPicture.Visible = True
Else
Me.UrgentPicture.Visible = False
End If

View 3 Replies View Related

Change Color Of Whole Line If Condition Yields True Of One Control

May 28, 2013

I know you can use a "Conditional format" to change a color of a control in a report. What I am trying to do is change the whole line if a condition yields "True" of one control. I did it once before, but oops I didn't save my work. I am using the format [Entity]![IT]. Where "Entity" is either the department or vendor, and "IT" is for the IT department. I want the control "Name" to change color if "Entity" is true if "IT" is the data.

View 3 Replies View Related

Browse To Macro Within Tab Control

Apr 23, 2015

Is it possible to use the "Browse To" macro within a subform on a Tab Control (Not a navigation form). I am trying to set up the "path to subform control" in a "Browse to" macro. I am not using a navigation form but instead am using the Tab Control feature. On my third tab I have two subforms; one that displays all of the records within a related document set in datasheet view, and a subform that displays each of these records individually. I want to be able to click on a record in my datasheet view and have it populate the main form.

I am just trying to figure out what the "Path to Subform Control" should be. All of the examples I have found are using Browse to on a navigation form and not a tab control. My Main form is called "BRC Form", The form in datasheet view that I want to make my selection from is called "Biomarker SubFrm", and the form I want the data to populate into is called "Copy of BiomarkerQry"..In the "On Click" event, I have added a browseto macro.

Here is the macro I am trying to mimic from the Contacts Web Database. Here is what I have so far. As you can see I am trying to figure out the proper code for my Path to Subform Control. again, this is not a navigation form so I need an extension that will work within this tab control.

View 1 Replies View Related

Forms :: Embedded Value Into Table

Mar 31, 2013

I have a form with a calculated time difference between a "Start" and "Stop" time I have managed to get the correct formula however I would like to display this value in a more civilized forma as HH:MM on the example attached I have some values that appear as 4:8 and it should be 04:08.

The second problem is I need to embed this calculated value on my tblTime as doing so I can run more easily some queries.

View 9 Replies View Related

Set Web Control Scroll Bar Value - Code / Macro

Sep 8, 2014

I have a Web Browser Control which displays the location of premise from a table using Bing. The Control itself isn't large enough to show the entire Bing page, so it has vertical and horizontal scroll bars.

It's vertical position is fine, but I'd like it to by default display from the far right hand side as opposed to the left. I'm guessing there's a way to set the ScrollValue (or similar) of the horizontal bar in code, but am unsure what to do. Or perhaps there's a really simple way and I'm missing it.

I've done quite a bit of searching, but keep coming up for solutions for List / Combo boxes etc.

View 4 Replies View Related

Forms :: Hyperlink URL With Embedded Reference To A Value

Jul 2, 2013

I would like to know if it is possible in Access 2007 to add a button/hyperlink where by the order number (as in the example below) is being sourced from another field [ORDNR]

i.e. replacing the 0996653 for example with a lookup to the ordernumber held in another column?!

[URL] .....

this link is one from a web url - I want to copy this in my DB.

View 1 Replies View Related

Forms :: New Buttons Are All Suddenly Embedded Macros?

Feb 3, 2015

I've been developing a new db and have been adding buttons to forms all along without any issue.

I would create a button and under the event tab in the properties sheet all the buttons used to indicate "On Click" would produce an [Event Procedure]. Suddenly the "On Click" now indicates an [Embedded Macro] is going to run, which is not what I really want to have happen......

View 1 Replies View Related

"Enabled=True" Moves Control

Jun 7, 2006

I have encountered a strange side effect. I am enabling and disabling several controls (the cludgy way-one at a time) depending upon the presence or absence of data in a field, using the oncurrent event to decide. It works.

But! It also moves some controls. Most of the controls stay put. But all four datepicker controls move to the upper left corner of the form when the oncurrent encounters the conditions that make these controls enabled. When they are disabled, they show up in the right place. When I navigate from a record where they are disabled to a record with data where they should be enabled, they are enabled but moved. When I navigate to a new record and all fields are enabled, but in their proper places. Any suggestions? Here's the code (* are the offending datepicker controls):

If IsNull(Me.Billed) And IsNull(Me.Paid) Then
Me.Categories.Enabled = True
Me.Project.Enabled = True
Me.Who_Are_You.Enabled = True
Me.Start.Enabled = True *
Me.End.Enabled = True *
Me.Billed.Enabled = True *
Me.Details.Enabled = True
Me.Paid.Enabled = True *
Me.btn_Billed_Now.Enabled = True
Me.btn_End_Now.Enabled = True
Me.btn_Paid_Now.Enabled = True
Me.btn_Start_Now.Enabled = True

Me.Categories.Locked = False
Me.Project.Locked = False
Me.Who_Are_You.Locked = False
Me.Start.Locked = False
Me.End.Locked = False
Me.Billed.Locked = False
Me.Details.Locked = False
Me.Paid.Locked = False

ElseIf IsNull(Me.Paid) Then
Me.Categories.Enabled = False
Me.Project.Enabled = False
Me.Who_Are_You.Enabled = False
Me.Start.Enabled = False
Me.End.Enabled = False
Me.Billed.Enabled = False
Me.Details.Enabled = False
Me.Paid.Locked = False
'Me.Paid.Enabled = True
Me.btn_Billed_Now.Enabled = False
Me.btn_End_Now.Enabled = False
Me.btn_Paid_Now.Enabled = True
Me.btn_Start_Now.Enabled = False
Else
Me.Categories.Enabled = False
Me.Project.Enabled = False
Me.Who_Are_You.Enabled = False
Me.Start.Enabled = False
Me.End.Enabled = False
Me.Billed.Enabled = False
Me.Details.Enabled = False
Me.Paid.Enabled = False
Me.btn_Billed_Now.Enabled = False
Me.btn_End_Now.Enabled = False
Me.btn_Paid_Now.Enabled = False
Me.btn_Start_Now.Enabled = False

Me.Categories.Locked = True
Me.Project.Locked = True
Me.Who_Are_You.Locked = True
Me.Start.Locked = True
Me.End.Locked = True
Me.Billed.Locked = True
Me.Details.Locked = True
Me.Paid.Locked = True

View 1 Replies View Related

Linking An Embedded Image From A Form To All Reports And Other Forms

Mar 4, 2005

I thought this would be pretty simple, but I cannot figure out how and wasn't able find the solution here or anyway.

I have a source form. (I can resort to having a Table with OLE Object if I must, but prefer not to.) On this source form I wish to include different things such as company logo. This will determine what logo shows up in all the reports, so all the reports will have an image linking back to this embedded image on the source form.

Pseudo-code Example:
frmSource contains imgLogo
rptSample contains an image whose
control source = Forms!frmSource!imgLogo

How can I do this or achieve the same effect in a more-or-less simple way?

TIA

View 2 Replies View Related

Forms :: Difference Between Shared And Embedded Picture Type?

May 29, 2013

For my database, I would like a picture as my background but I don't know if I should use embedded or shared?

View 2 Replies View Related

Forms :: Embedded Chart OLE Not Plotting Data Correctly

Aug 8, 2013

I am using Access 2007 with Windows XP. I have a scatter chart embedded in a form that is plotting data from a subform with a trendline that is extracted and used on the form for calculations. After having the table set up correctly and running fine, I closed the database and then reopened it to have the table plotting the data in a made up 1 to 1 relationship rather than what is in the datasheet. The only way I have been able to fix this error is to change the chart type to something else then back to a scatter plot and remake the trendline. Why this is happening and how to prevent it?

View 1 Replies View Related

Forms :: Checkbox To Hide / Show Series In Embedded Chart

Dec 13, 2013

I have chart (grpMaster) that is embedded in a form (frmMain), the chart is a line graph based on a query (qryDataFilter) with 4 data series.

What I want to do is have various checkboxes (chk1 to chk4) that if selected show the series and if no don't - It seems straight forward!

I've tried SeriesCollection() but this comes up with errors. (Object doesn't support this property or Method).

The easiest way i can think of is just to hide / show the series line on the chart, but can't figure this out?

View 4 Replies View Related

Forms :: Embedded Within A Loop To Send Various Filters Of Report To Different Recipients

Aug 15, 2013

In a form I have a button which creates (in preview) an outlook message with a pdf report. It opens and displays just as I want it to, but if I chose to save that message in outlook and either send or cancel (i.e. allowing user to save to drafts and send later) then MS Access crashes.To ensure this wasn't to do with any compile / corruption within my full application I mirrored the process in a very simple 1 table / 1 form / 1 report db and still the same - access crashes after saving the outlook message and either sending the message or cancelling out the message.

Form code is as follows;Private Sub Command0_Click()
On Error Resume Next
DoCmd.SendObject acSendReport, "Table1", acFormatPDF, "someemaddress", , , , "REQUEST FOR INFORMATION"
DoEvents
On Error GoTo 0
End Sub

In my main application this process is embedded within a loop to send various filters of the report to different recipients, which works fine if 'save' is not used within Outlook..

View 1 Replies View Related

Forms :: Changing Embedded Excel Sheet Cell Value - Access 2010

Mar 9, 2014

I would like to embed a blank worksheet in access form. I want to do a macro to change the cells value when I click on a button, but I don't know how to do it?

View 3 Replies View Related

Forms :: True / False - Form Properties Based On Field Value

Sep 10, 2014

On my form ECOs

When my text box RELNUM is > 0 I want form properties AllowEdits set to FALSE.

When RELNUM is null I want form properties AllowEdits set to TRUE.

This must be possible, but not entirely sure where to start.

Since I can scroll through records in this form I'm thinking I have to put an event in ON LOAD, bbut beyond that I'm at a lost.

View 11 Replies View Related

Forms :: Invalid Control Property - Control Source

Sep 24, 2013

I added a new field to one of my tables and query, but when I try to add a control for that field into my form it is not recognising it and the field isn't appearing in the sources for the form, even though the table is sourced to the form? Or am I going to have to do the usual and redo the entire form because I made a minor adjustment?

View 1 Replies View Related

Forms :: Web Browser Control Inside A Tab Control Display

Jun 18, 2014

I have a form with a tab control, inside the tab control I placed an ActiveX control (Microsoft Web Browser). These are at the bottom of the form.

Everything displays fine if the entire form fit on the screen but if the form is too long and I scroll down the browser control is getting obscured by the tab control and getting chopped off (the contents are covered). It is as if the browser control is staying in space where it was and moving behind the tab control as I scroll.

This problem does not occur if I place the browser control directly on the form. Also I note that the browser control is sitting correctly within the tab control.

I have been through all the settings and properties of both controls and haven't been able to fix it. I searched all over the web but no one has previously stumbled across this one by the look of it.

See the attached image ...

View 3 Replies View Related

Modules & VBA :: Write A More Complex Macro That Will Start Another Macro At Preset Time

Dec 8, 2013

I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.

Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"

Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"

[code]....

View 1 Replies View Related

Macro Won't Display Forms

Jan 7, 2007

I am trying to create a new macro in my database.
I selected the Openform action and tried to choose the name of the form but when I try and select the name of the form from the dropdown menu, I receive the following message:
THE SEARCH KEY WAS NOT FOUND IN ANY RECORD.

I am not able to see any of my forms on this dropdown menu.

Can anyone please help. I am using Microsoft Access 2002.

Thank you.

Rob

View 1 Replies View Related

Forms :: Maximize When Opened By Macro?

Feb 19, 2014

I have a form that maximizes when it loads and that works fine, but when I run a macro to open it the command is bypassed. Is there a way around this?

I've tried setting the code to run on different events (open/activate) but that didn't change anything.

The reason I want a Macro to open it is so I can set the property to Add only, perhaps there's another way I can do that, perhaps as part on the form open event in VBA instead?

View 2 Replies View Related

Forms :: Macro Does Not Work In A Subform

Jul 8, 2013

I have a sub form that contains two fields of FabricNum(ComboBox) and RollNum(ComboBox). The RollNum is restricted to the FabricNum so whenever I choose a FabricNum, list of RollNum changes respectively.

In order to do that, I created a query that contains the FabricNum and RollNum. The FabricNum in the query is restricted to the chosen FabricNum in the subform. I also have an embedded macro on FabricNum which opens the query, close the query and requery based on RollNumber. All what I have explained work perfect once it gets done in a sub form. When I try to do the same thing in a Main form, it does give me an error.

After researches I realized that I have to change the path in a query and I changed it as following:

[Forms]![FabricUsageDetail1].[FabricUsageDetail2].[Form].[FabricNum].

Unfortunately, I still get an error of 2950 which says the command or action "Requery" is not available now.

View 12 Replies View Related

Forms :: Macro To Save New Records?

Jun 19, 2013

I've created a macro for saving records, but it's just over write on the previous record, what's the best way to save new records using forms?

View 2 Replies View Related







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