I have a form that is intended to be used for both data entry and to edit/delete records.
The form properties are set to:
AllowFilters = YES
AllowEdits = YES
AllowAdditions = YES
AllowDeletions = NO
DataEntry = YES
When a user opens the form from a menu they are given the choice for NEW, EDIT or DELETE.
If the user chooses NEW, the properties remain as above
If the user chooses EDIT or DELETE the form should open to a specific record as chosen on an interim form.
I have been using the following code to open the form for EDIT:
stLinkCriteria = "[fldID] = " & Forms!frmsearchresults.fldID
DoCmd.OpenForm "frmJobInfo", acNormal, , stLinkCriteria, , acFormEdit
However, the form continues to open in Data Entry mode.
I have a public variable that is set to NEW, EDIT or DELETE that can be used to trigger code...
Where should the form properties be set to make sure that the form opens correctly?
Then Af lost from view and Bf appears in form view, with Blabel and Bcombox show the value of Atxtbox.
BUT if I try something like this in Bf when an event happens
Code: Me.Bcombox2.RowSource = "SELECT xx FROM tablexx WHERE yy = '" & Nz(Me.Bcombox) & "'"
Nothing will be shown in Bcombox2, because Me.Bcombox return Null. I know this from doing
Code: MsgBox Me.Bcombox
and the message box will shows nothing. The same thing also happen with the Blabel's caption. In form view, it shows Atxtbox value, but when I accessed its caption's value, it returns Null.
What I wanna do is:
1) Open Af, insert value to Atxtbox
2) clicked Abtn, pass the value of Atxtbox to Bcombox
I have only been playing with MS Access for a little while and I do not know all there is to know yet so I figured I come here to ask a question.
I use MS Access in web design and lately I have been experiencing a problem with my registration form which inserts new users into an MS Access database table.
Lately my registration form has become a target for spammers trying to inject spam in the form of html code into the password field of the online registration form.
I figured that I could deter this from happening by only allowing the letters A - Z and numbers 0 - 9 in the field and not allowing characters like < > and ? and ".
I assume I can do this with a validation rule but I'm unsure as to how I would go about setting this up. Limiting the field size to only 50 characters does not seem to work unfortunately.
Any help on how to set up a validation rule would be appreciated.
I am trying to get the properties of enabled and locked set in a continuious subform depending on a yes/no field in each record. I have tried using the answer in thread 160062, but this only works when it is not a subform (unless I have done something stupid!)If the main form is frmMain and the continuious subform is frmSub, where am I going wrong with this code which is in the subforms Class Objects?
Private Sub Form_Current() If Me.MaterialIssue = True Then CRMSignOffDate.Enabled = True CRMSignOffBy.Enabled = True CRMSignOffDate.Locked = False CRMSignOffBy.Locked = False Else CRMSignOffDate.Enabled = False CRMSignOffBy.Enabled = False CRMSignOffDate.Locked = True CRMSignOffBy.Locked = True End IfEnd Submany.
Good afternoon, I have finished completing the initial version of a database and am now ready to begin the testing phase. When looking at the database properties (Specifically - "Statistics") there is a "Revision Number", which is always blank. I expect some changes and would like to set the Version Number each time I make a revision. How do I set the "Revision Number" found under the Statistics tab from Database Properties which was pulled from the "File" button on the toolbar?
I am try to open a form from another and set a button's OnClick properties to a function and I keep getting an error message..Run-Time Error 2450Cannot find the referenced form ..And this is the code I am using.
Hi, I would like to change the properties of either the column heads in a combo-box or the column names for tables. I don't think there's any way to adjust the column head properties, and I'm doubtful there's a way to change the column caption properties.
Some of my column titles are long, and I'd like to be able to word wrap them essentially. Anyone know if this is possible? Thanks.
I have created a sub form and wanted to make it's background transparent and also be able to enter new data and change it on the form. I sat Data entry = Yes, but I still can't enter any data. And I can't find the Back Style property at all.
Any help how to do that will be very much appreciated. B
I created and new field and made the source "Unbound" so that it is not connected to the field I copied it from. How do I now make that the information I enter in the new field does not duplicate in all of the similar fields in other entries.
Specifically, my database is a database of employees and the field Title is "Active". If I enter "Yes" by one employee entry, all employee entries will then state "Yes" by the Active field.
How can I change the properties so that by some employees I can write "Yes" and by others I can enter "No".
I am not so familiar with Access so if you can be specific I would greatly appreciate it.
I have a standard form but i would like it so that when a user clicks on the button from the main menu to open the form it changes the default view which i have set to data entry and change it to not data entry. Also another button to change its record source to a different query. Rather than make lots of different forms that have the same thing but for just different purposes.
A member of the Access User Group that I am associated with has asked a question that I can't answer.
In older versions of Access, when you went from Form Design View to Form View, if the Properties Sheet had been visible, it would be hidden in Form View. Since probably Access 2000, the Properties Sheet remains visible in Form View (if it was opened in Design View). Not a big problem, you say? Well, it is to this person, who is concerned about her users seeing the Properties Sheet and making changes in it.
Anyone know a way to defeat this behavior and hide the Properties Sheet in Form View?
I know this is probably a silly question but I had a number of checkboxes in a table and had set their default value to be 0 however I did not do this in the table properties of these fields.
I can understand some things like formatting dates in a form but storing it differently in the table but why did access not automatically input 0s in all the fields where I did not check the box?
I am working in the design view of a form, the controls properties sheet disappeared-gone and even clicking the properties sheet button it does not come back.
I have a single form which becomes either readonly or editable or addnew using a circular toggle switch. The toggle switch is activated by a command button and the caption of the command button is used as the display of the mode.
The SetAddModeBt is a separate command button that initiates the add mode. The problem is that various form or field properties when defined on the fly are not stored and they get lost when you open the form again. Look at the code below:
Code: Sub tglEditBt_Click() '------------------------------------------------------------------------------- ' Circular toggle button to change display mode of the form ' ReadOnly - Edit - Add '------------------------------------------------------------------------------- ' On Error GoTo NotFound Dim ForName As String Dim strSQL As String Dim FMode As String
[Code] ....
Here the first two cases fail when executing the last statement saying it is not supported.
When I right click a row on the data sheet side of a split form an select "New Record" I want the curser to go to the first field on the single record side. I've placed this in the OnCurrent but it did no good.
Code:
If Me.NewRecord Then Me!Descrfiption.SetFocus. End If
Any way to set the focus to the single form Side of a split form?
I have a form with a query based bound combo. The same combo can be found on another form which can be launched from the original form. I want to update the combo on the original form with the same value as the combo on the launched form (after update).
In my after update event I have the following code;
[Foms]![form1]![Combo1] = Combo 2
This doesn't seem to work (I don't get an error but Combo1 doesn't update).
I need to have a field on my form to accept the user keying in the number in this fashion: 200200.1234 but as I currently have it set it accepts only the 200200 portion of this part number. I am a beginner so I am sure this is an easy question for some of the pros out there.
As a footnote the table design has the bin no. as data type - text and I added an input mask of 000000.0000;0; the field on the form is a combo box. Maybe that will make a clear picture for you.
On a form i have a text box which holds the date that a file batch was taken to be processed. Each file holds the date of when the batch it originated from was taken. At the moment for ease of use the 'Default Value' of the text box is set to the batch's date.
I want to set it up so i can change the default value of the cell, so that when a new batch is to be processed the new date becomes the default value.
I am invisaging a button which brings up another form with a text box into which the new date can be put. when the form is saved and closed, the date recieved cell on the master form assumes the new default value.
Hi, I am a new member, who has been reading these postings for several weeks, hoping for a few quick answers, but no luck.
I have several issues on form size.
The first is that some of my forms open OK, but they change the form size of the form that opened them. My main form is maximized. When I open a child form, not maximized, the main form, and the open Access windows, such as the DataBase form and any open Tables, Queries, Reports, etc all become non-maximized.
The main form has the dimensions of the last-opened form .mde files, which leads me to believe that there is some Access option that crosses project or database lines. I cannot find it.
If I maximize the main form with the child form open, Access maximizes the child form also. If any form is open in Design View, the Properties window may be on top of everything. As the controls I need are seldom visible in these small windows, I spend much effort resizing windows.
What do I need to do to have a maximized "Switchboard" and smaller child windows/Forms???
I am trying to access the same query/report from different forms. For example I have a StudentAttendanceForm where users select a StudentID and then open the report. The query criteria for ID# is [Forms]!
[StudentAttendanceForm]![StudentID].
Can I access this same report from an event on another form. I'm thinking that if I can some how assign the StudentID from the form I want to access the report from, to the criteria on the StudentAttendanceReport Query, this is possible.
I am new to code but I am thinking something like:
SET [StudentAttendanceQuery]![StudentID] TO [StudentEnrollmentForm]![StudentID] Open StudentAttendance Report
The StudentEnrollmentForm is the other form I want to access the report from
You may need a crystal ball for this one. Let me know what other info you need.
In general I am finding I am copying and tweaking queries to meet specific user needs. For example some want to access a single student and other need "batch" reports.
When I am working on the Lesson 37 shown here:[URL]
I get to the point
Click the label that was added to the subform and press Delete (to remove the label). You may also need to move the subform and resize the tab sheet.
Now I assume the label to be removed is the original title of the subform or sbfVideos. That is the label that must be removed. It also says "You may also need to move the subform and resize the tab sheet." I will say that you do. My tab sheet is about 2 3/8 inches in width. I want to move it so the width increase to 3.25 as shown in the figure in the tutorial right after it says that you need to resize tab sheet.
When I grab the far right orange line and pull to the right the whole subform moves! That is not what I want.I merely want to increase the width of the form as I said above.Also in this narrow initial file when I switch to form, it cuts off parts, usually the Length. Of course, that is not what I want.
Why the ability to view the properties of an object within a form is not available when you double click on it in design view?
I was happily working away double clicking on a command button to edit some code when for some reason the next time I tried to edit it did not open up for me.
I was unable to access it even by right clicking on the object & selecting properties as that also appears to be disabled, not greyed out or anything but just does nothing when selected.
Have I inadvertently changed a setting somewhere that prevents the properties from being displayed?