Stewart,
Perfect, that works fine now. Thanks for your help.
User Profile
Collapse
-
TheSmileyCoder
Thanks for your reply, all useful information.Leave a comment:
-
Set focus in Main Form from PopUp Form
I have an application that is used to collect clinical data from hospital patients involved in research. Various forms are used to collect specific data, often blood results. When the users enter this data, they may make a mistake and enter a value well outside the normal range. The normal range differs depending on the blood test.
If the value entered is outside the expected range, a PopUp form is opened, and values are passed using... -
I seem to have found a solution to the 'Write Conflict. I use the following code before opening the second form:
That seems to avoid any conflicts with multiple forms bound to the same table.Code:RunCommand acSaveRecord
Leave a comment:
-
TheSmileyCoder,
Thanks for taking the trouble to reply. I did try closing form 1 before opening form 2, but still received the same message. I also get the same write conflict message when opening a second form not bound to the same table, so the issue, I suspect, is nothing to do with locks, this may be a confounding error masking something else.
I never used to get this on earlier versions of the same database which...Leave a comment:
-
Write Conflict
I have been getting a message about a 'Write Conflict' when moving between forms, and am struggling to understand the issue.
I am using Access 2007, and have a relational database with around 10 tables of data and around 40 tables used as LookUp for ComboBox controls. I have more than one form bound to some tables, but only one form loaded at a time. after adding or editing data, I click a command button which opens the next form then... -
Thanks RecSetx, that was what I wanted. I think its called the ordinal reference. Thank you.Leave a comment:
-
What I mean is that in all recordsets the first field is the hospital number, but how can i refer to the first field if not by name? Thanks for looking at this for me.Leave a comment:
-
Hit a snag looping through tables and records
I am producing a statistic for one of the managers at work concerning hospital patients. I have a database with about 120 tables, some of which relate to a set of patients. All the table names I am interested in start with the four letters 'READ'. I loop through each of these tables, then loop through each record, and finally loop through each field. I am counting the total number of fields, and the total number of null fields. This all works fine.... -
OK desatino, I found an API that hides the Application Toolbar, which negates the need for my code. It does not answer the question about why this was happening in the first place, but as NeoPa pointed out, this may be an issue with the OS. Thanks for the help.Leave a comment:
-
NeoPa - in answer to your questions:
1 When Close Command button clicked on second Form Form closes, no problem
2 After Application Close has been attempted, user clicks Close button, nothing happens (however, pressing Esc closes Form)
dsatino - Not sure how to hide Application title bar, and had not thought of this either. Any advice?Leave a comment:
-
Yep, application closes when user clicks Close Command Button on the main Form, and application does not close if only main Form open and user tries to close it with the red X top right, but does then close if user then clicks the Close Command Button. The problem starts when a second Form is opened.Leave a comment:
-
Strange problem closing Access
I have an application using multiple Forms, all unbound. The main Form enables users to select which other Forms they want to use, only one at a time, all Modal. I don't want users to close Access via the red Close X top right, only from the main menu Form, which records certain data when closing.
To achieve this, I declared a public variable at Form level in the main 'menu' Form:
...Code:Public fOKClose As Boolean
-
Hi Stewart,
That is what I thought, so thanks for your time anyway.Leave a comment:
-
Change Event ComboBox
Hi, I have a simple question about setting the value of a variable from a ComboBox. I'm sure this is easy to do, but I can't think of a way right now.
I have an unbound Form with around 10 ComboBoxes, and I want to set the boolean variable bDirty to True when any on the ComboBoxe values are changed. If the Form was Bound this would be no problem, I could use Form_Dirty, but not for unbound Forms. I could put a line of code in the Change... -
Hi Stewart, Yes, I should have said my Form is unbound. I take it from your answer there is no way to get Dirty to work with an unbound Form? If that is the case I'll just have to put code in every control event, what a pain!Leave a comment:
-
Form_Dirty will not fire
Hi, need some help - Using Access 2003, Windows XP
Trying to get the Form Dirty event to work, but no joy. I was under the impression when a key is pressed in a control such as a TextBox or a selection from a ComboBox is made, the Form's Dirty event fires. Here is my code
Why is this not working?Code:Private Sub Form_Dirty(Cancel As Integer) If Me.Dirty Then Me!cmdTest.Enabled = True End Sub
-
Form Click Event
I have a single Form with a Tab Control with multiple pages, and over 200 controls, mostly Textbox and ComboBox. I have some code that is fired by the KeyPress event of the Form (KeyPreview = True) that loops through controls, changing the BackColor to white except for the control with the focus, which has a BackColor of yellow. This all works fine.
Problem is the end users often move around the Form using the mouse and clicking into... -
Looping through all controls on a page of Tab Control
This seems to work, thanks to help from NeoPa. The variable iTabPage refers to the active tab, so I don't loop through every page, and I only want text boxes and combo boxes, so I look at the first three letters of the control name. Thanks for your help with this.
...Code:Private Sub sBackColour() Dim Ctl As Control For Each Ctl In Me![TabCtl].Pages
Leave a comment:
-
Thanks for your help ADezii. Here is the code I have entered in the KeyPress Event of the tab control.
...Code:Private Sub TabCtl_KeyPress(KeyAscii As Integer) Dim Ctl As Control Dim Ctl2 As Control For Each Ctl In Me.Controls If Ctl.Parent.Name = "TabCtl" Then For Each Ctl2 In Me![TabCtl].Pages(Ctl.Name).Controls Ctl2.BackColor = QBColor(4) Next End If NextLeave a comment:
No activity results to display
Show More
Leave a comment: