Modules & VBA :: Determining If Another Form Is Loaded In Add Mode

Feb 2, 2014

I have two related forms.One is a list of transactions and the other is used for both inquiry and adding new transactions. If the Inquiry form is just sitting in Add mode and the List form tries to open it in Edit mode, it won't open. Is there a way I can tell from the List form that the Inquiry form is in Add mode and either close it or tell the operator about the issue?

View Replies


ADVERTISEMENT

Modules & VBA :: Check Status Of Insert Key (On Or Off) When Form Is Loaded

Sep 12, 2014

is there a way in vba we can check the status of Insert key if it is on or off when the form is loaded?

i want for the insert key to be on, where the key strokes write over the existing entry.

i do set the key preview to "yes" in the form, and it works fine, but i wanted it only on a specific object.

View 2 Replies View Related

Forms :: Subform Shows In Design Mode But Not In Form Mode?

Sep 22, 2014

I have several subform tabs and one that I have updated no longer shows up when I run the form on Form mode. The tab is there but no content or details of the subform

View 3 Replies View Related

Modules & VBA :: Determining New Month And Run A Procedure

Aug 6, 2013

I've been stumped for the past couple of days trying to discern a method for a form to determine that it's a new month and run a procedure and only run it on month change.

My initial thought is:

Open recordset
move to the last record
compare the month in a date field within the last record to the current month
and run the procedure if the month is different.

I can't get this to work however and I'm not sure what I'm doing wrong. To be honest I typically fumble my way through VBA when it comes to opening recordsets. Here's what I got:

Code:
Dim rs As DAO.Recordset
Dim db as CurrentDB
Dim strSQL As String
Set rs = CurrentDB.OpenRecordset("FlightLog")
strSQL = SELECT [txtDate] FROM [FlightLog]

[Code] ....

txtReqNumb and txtFltNumb are the values to be reset at the beginning of each month.

Am I on the right track and just have the VBA wrong?

View 4 Replies View Related

Modules & VBA :: Find Text On Loaded HTML Page

May 5, 2015

I am simply trying to find text on a Web Browser Control htm page.

Using MS Access 2003, I have a form that includes the activeX Web Browser Control. On load of the form I initialize the web like below:

Code:
Dim strURL As String
strURL = "http://www.justice.gov/eoir/profcond/chart.htm"
Me.WebBrowser0.Navigate strURL
Me.WebBrowser0.Silent = True

The page loads fine.

Now, also, on my form is an unbound text box I call: [txtFind] and a command button I call [cmdFind]. I want [cmdFind] to find the first occurrence of the value in [txtFind]. My code below doesn't do anything when I click the [cmdFind] button.

Code:
Public oRange As Object
Public myfindFirst As Boolean
Public intTextLength As Long
Private Sub cmdFind_Click()
Dim sSearch As String
Dim strText As String

[Code] .....

View 9 Replies View Related

Modules & VBA :: Form To Display Subset Of Records In Datasheet Mode?

Feb 3, 2015

I created a form to enter the lookup data and build the SQL string to create a recordset in VBA that is a subset of the original data. Using the Form wizard I created a form that displays ALL of the records in that original table (actually a QUERY). What I want to do is open this second form but have it reference the recordset I built in VBA.

View 1 Replies View Related

Modules & VBA :: Determining Number Of Users Of Split Database

Nov 1, 2013

We have a database that is split. Every user has their own front end (installed via a .bat file so that the users always have a local copy of the most recent version), linked to a shared back end on a server. This seems stable and functional for us so far.

However, because our users are geographically separated, I don't actually know how many folks are using the database. I know the folks who contact me, but everyone in our company could use it if they wanted to.

For requesting funding, guiding future development, etc., I need to get some metrics:

Total number of unique users
Avg uses per day

Total number of simultaneous users (daily, weekly, and monthly maxes and mins)

What is the best way to get this info? Write user info and a timestamp to a table each time a front end is launched? Are there tools for monitoring this sort of information?

View 3 Replies View Related

Determining A Forms Location (when Form Is Not Current)

May 31, 2005

Greetings. :)

I am trying to position opened forms so that they are cascaded on the screen. I have discovered the movesize action (for the DoCmd) and Move property of a form (for Acc 2002/2003). However, if the application is opened up on different monitors (e.g.; 17" or 19"), the relative location of the opened form is not the same (i.e.; on the bigger monitor the opened form is too far over to the right and too high).

What I want to do is ...

When the subsequent (or second) form is opened up I would like to find the absolute location of the first form (always centered). This way I will be able to reposition the second and third forms relative to the first form.

Is this possible?

I'm having trouble referencing the first form from within the second form. The first form is still open, but they are not linked forms (not parent/child). I've tried:

forms("firstformname").left
forms("firstformname").top

but this does not work.

I've gone to online help and I've looked around in the newsgroups. But can't find any info. Anybody out there will suggestions?

Regards,
SueB :confused:

View 1 Replies View Related

Forms :: Access 2003 / Do Not Display Form Until Fully Loaded

Sep 23, 2013

Access 2003

I have a rather complex form with an ODBC connection to data that takes some time to load.

The Form has a continuous subform I am using in place of a listbox to select records (I need more functionality than a listbox)

The Form's Record Source is a query

When the form opens, I does so in pieces as it populates

I'd like to either keep the form hidden until it completely loads

View 1 Replies View Related

Forms :: Timer Event - Wait Until Form Fully Loaded Before Visible

Nov 7, 2014

I have tried using a timer event to not show a form until it is fully loaded, to no avail.

Code:
If CurrentProject.AllForms("FONNewEdit").IsLoaded = True Then
Me.Visible = True
Me.TimerInterval = 0
End If

I have tried using the onload, onopen but the form still displays before being fully loaded.

View 7 Replies View Related

Modules & VBA :: Datasheet Mode Form For Both Data Entry And Data Retrieval

Feb 9, 2015

I want to use the same form in datasheet mode for data entry and retrieval. When retrieving, all controls are disabled and locked. I am trying to enable and unlock them for modifying but that isn't working.

<code>
DoCmd.OpenForm "PO_Practice Data", , , , acFormEdit, acHidden

Forms![PO_Practice Data]!PO_Name.Enabled = True
Forms![PO_Practice Data]!PO_Name.Locked = False
Forms![PO_Practice Data]!Practice_Name.Enabled = True
Forms![PO_Practice Data]!Practice_Name.Locked = False

[code]...

View 3 Replies View Related

Modules & VBA :: Check If Database Is Open (Read Only Mode)

Jul 16, 2015

I would like to be able to check if a db is open and if it is to prevent the user from proceeding.

I use the Access 2013 Runtime. I can check if a db is open by trying to open Exclusively, using something like

Code: [URL] ....

But if the db is already open Not exclusively and I try to open it exclusively it does not raise an error and it allows the user to open the db in Read Only mode.

I would like to be able to prevent this, because careless and/or inexperienced users may open several instances of the db.

Of course, if the db is already open exclusively it does not allow you to open it exclusively another time.

View 5 Replies View Related

Modules & VBA :: Word Doc With Command Button - Edit Mode

Oct 2, 2014

I have a Word Doc with a Command Button.

The Command Button loads a form.

How do I find the form in "Edit Mode"

Alt-F11 opens the VBA editor but I don't seem to be able to locate the form there.

View 1 Replies View Related

Modules & VBA :: Controlling Fields In A SubForm Displayed In DataSheet Mode

Dec 2, 2013

I have a Form to Display Projects that has a SubForm displaying Sub-Projects related to them. The main Project Form has a Combo Box which allows a user to select a ProjectID to display. The SubForm has a ProjectID Field as well. When the Project ID is selected in the Main Form, only the appropriate Sub-Projects are displayed in the Sub-Form.

On the SubForm, there is a Field named ActionID, which uses the following VB Code to limit the availability of the Fields in the SubForm that apply to Dates. If the selected Action is Install, only Install related Dates should be available. Likewise, if the selected Action is Remove only Remove related Dates should be available.

Code:

If Me.ActionID.Column(1) = "Install" Then
Me.AssetInstallMonth.Enabled = True
Me.AssetInstallYear.Enabled = True
Me.AssetRemovalYear.Enabled = False
Me.AssetInstallMonth.Locked = False

[Code] ....

Everything seems to work as expected until there is more than one Sub-Project is the SubForm and they do not contain the same Action. In these cases, it appears as if the Sub-Projects in the SubForm are not being treated as individual records. If Sub-Project is Added or Modified to have an action of "Install", all records are treated as Install Records (only Install related Dates are available), regardless of their content.

Is there a way to update the properties for only the row that has been selected?

View 5 Replies View Related

Modules & VBA :: Copy Access Data Into Excel Template In Read And Write Mode

Jun 20, 2015

How to open a pre filled excel template in read and write mode from msaccess vba and insert data from msaccess tables into specific columns in excel.

Rename the tabs in excel sheet based on a specific column in the access data.

Each row in the table will go to a seperate tab in excel.

Save the excel template after populating the necessary data into different tabs.

View 3 Replies View Related

Set Properties In Non-loaded Forms

Feb 17, 2006

Hi all,

I would like to set the filter property in some forms that are not loaded. Does anybody now how these forms and their properties can be accessed via VBA?

Cheers

View 1 Replies View Related

Openning A Form In Add Mode

Oct 6, 2006

Hi All,


This is such a newbie question I realise, but I have a form (frmFOBEntry) with a combobox (cboMarketCode) which returns a list from tblMarketCode.

New records are added to tblMarketCode using a form frmMarketCode

When I look through the combobox on the first form if the MarketCode I want is not there I want to be able to click a button which will open frmMarketCode in add mode.

Have looked through the forum and found all manner of flash ways to open on to certain records and the like, but nothing that simply opens the form so you can add a new record.

Also, if I add a record will the combobox update automatically?

Many thanks

View 2 Replies View Related

Determining Tables Etc. Used By .adp

Sep 7, 2005

I have an .adp file but I'm not sure which tables/mdb file(s) are used. Any easy way to determine this? I'm backward engineering because someone got fired. Any help would be appreciated.

View 1 Replies View Related

Determining Focus

Jan 4, 2007

Is it possible to use the "On Lost Focus" event to determine which control now has focus?

View 6 Replies View Related

Malfunctioning Forms When Loaded From Switchboard

Apr 23, 2013

I have a db that I added a switchboard to; it has 6 buttons, the first 4 work correctly. The remaining 2 buttons, Btn5 and Btn6 load forms "Gallery" and "Beginner_Pics" that display pictures. These 2 forms work perfectly when I load them directly. These Forms do not pause for a comboBox selection to be made; they act as though a selection was made ending with my error message display. No subsequent ComboBox selections work thereafter. At first I thought the Switchboard was loading old Forms, since the Switchboard was developed before the last two forms were totally debuged, but all old Forms have all been deleted. I do not know where to look for the problem Switchboard or the errant forms. Is it possible I need an "On Load" Event Procedure to force a ComboBox selection?

View 4 Replies View Related

Default Add Mode On Current Form

Apr 19, 2005

I've created a form with Record Navigator which allows a user to create a new record. When the form is opened how do I immediately put the user into add mode by default?

Thanks

View 2 Replies View Related

Maximized Form Changes To Restore Mode

Sep 12, 2005

:confused:

I have a db app that has all forms maximized continually (I have set the vba code to do so on Open, Close and GotFocus events). From my app Home Page form the user can browse to other forms in the db. When another form is opened the window automaically maximizes. However, when the user navigates back to the Home Page it goes in restore mode. I haven't told it to do this anywhere. I have also tried saving the form stretched out to fit the full screen, so that if it goes into restore mode it at least still fills the screen, but it still reverts to a restored window (about half the screen). It doesn't matter what configuration I use in the AutoResize, AutoCenter properties either.

I have been developing custom db apps in Access for over 8 years. However, this seems to be a stupid (albeit simple) problem that is annoying me. I currently use Access 2003 and this issue is new (or so I believe since I never ran into the problem in previous versions).

Any ideas?

Thanks...

View 6 Replies View Related

Form Mode In Switchboard Question

Dec 1, 2005

Have a question on the switchboard choices I've always wondered about. Why are there only "Add" and "Edit" modes to open a form from the switchboard? I see many, many times when you want to allow a form to be opened in "readonly" mode to page through records but not allow edits or additions. Why does Access NOT have "Readonly" as an option?

View 2 Replies View Related

Launching A Form In Datasheet Mode

Jun 10, 2006

I have a form designed in DS mode. If I open it directly (double click on it on the Panel), it works fine

When opening it programmatically (from a button in another form) it shows just ONE record, in spite of having room enough for several records.

May I get some help to check what am I doing wrong?

thanks

View 2 Replies View Related

Calendar, Code And Determining Value

May 8, 2006

Working on a calendar project. I've found some helpful code, but I don't want to use someone elses whole project. So while trying to understand how all this works I'm running into some problems. I am using to start one of the simpliest codes I have found.
```````````````````````````````
Private Function filldates()

Dim curday As Variant, curbox As Integer, Tbox As Variant

curday = DateSerial(Year(Me![FirstDate]), Month(Me![FirstDate]), 1) 'first day of month
curday = DateAdd("d", 1 - Weekday(curday), curday) 'back to sunday
For curbox = 0 To 36 'need to loop thru 36 textboxes
Me("D" & curbox) = Day(curday)
Me("D" & curbox).Visible = False
Me("T" & curbox).Visible = False
If Month(curday) = Month(Me!FirstDate) Then Me("D" & curbox).Visible = True
If Month(curday) = Month(Me!FirstDate) Then Me("T" & curbox).Visible = True
curday = curday + 1 'nextday

Next curbox

End Function
```````````````````````````````````````
'Note' I have added the "T" box for additional info.....

My problem is this...... I have 36 boxes that can contain variable dates. What I want to do is on the "Click" or "DoubleClick" event of say...... box "T14" I need to determine what date is the current value of "T14" and then I can open the other form to that date. This other form would be details of whatever date is currently in "T14"
Does that make sense???? Hope so! :)
Any thoughts??

Thanks
Curtis

View 3 Replies View Related

Determining Appropriate Const MaxRecords

Jun 7, 2005

I have an ASP / Access storefront, connecting through JET OLE, which is frequently crashing with '800040005 System Resource Exceeded'. The whole ODBC/Jet service must be restarted by my host manually.

Usually this error indicates an unclosed rs.open. I have however triple checked all code and there are no unclosed loops.

I am examining the basic connection variables and wondering if perhaps as my database has grown over the last year, the following original 'out of the box' settings are no longer suitable, and causing this error.. in particular maybe the 'Const MaxRecords' is no longer enough (or is too many?). How does one calculate what these Const settings should be?

Thanks for any help!

Code:Response.Buffer = TrueConst adEditAdd = 2Const adCmdText = 1Const adCmdTable = 2Const adOpenForwardOnly = 0Const adOpenKeyset = 1Const adOpenDynamic = 2Const adOpenStatic = 3Const adUseClient = 3Const adLockPessimistic = 2Const adLockOptimistic = 3Const maxRecords = 200

View 1 Replies View Related







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