General :: Subform Keypress Of Return
Oct 7, 2013I have a subform when a user presses Return Or Enter it doesnt go to a new record but instead enters a new line in the same records how can i prevent this from happeneing.
View RepliesI have a subform when a user presses Return Or Enter it doesnt go to a new record but instead enters a new line in the same records how can i prevent this from happeneing.
View RepliesI have a form which consists of 20 similar subforms. The subform has only two fields.
When I want to go to the next subform, I use CTRL TAB
But I want to use only TAB.
I have tried a couple of things with the keypress event of that control, but cannot find a solution that works. What I would like:
- when the user is pressing TAB in the last field of a subform, that the program reacts like CTRL TAB and goes to the next subform.
I have a database which has a main form and subform built in linked by parent/child customerid, what i would like to do is search all the subform records from the whole DB and return its parent record on the main form?
Can this be done? because if i use find it will only search the filtered form i have onload of the form?
My onload event is based on fosusername()
Hi
I was wondering if it is possible if I press a key on the keyboard say 'c' once I've opened the combo box, that I will be taken to name in the SECOND COLUMN that begins with c. At the moment if I was to press 'c' it will take me to a unique identifier that begins with c as the unique identifiers are in the FIRST column not in the second.
Can anyone help me?
Cheers
Bikeboardsurf :confused:
hey guys, i have this code which will let you type into a combo box "db" and it will pick out the selection "Die Cut / Back Slit". the following code works except for an error message coming up before it goes into the code.
"the text you entered isnt an item in the list"
anyone know how i can get around this? i tried turning warnings off on the sub but it seems to happen by default before the sub?
Code:Private Sub cmbCut_KeyPress(KeyAscii As Integer)' if pressed not enter or tab , add to a string then select value from entered chars'enter or tab key pressed (added delete and space keys to miss adding to string)If KeyAscii <> 13 And KeyAscii <> 9 And KeyAscii <> 8 And KeyAscii <> 32 Then enteredChars = enteredChars & Chr(KeyAscii)Else DoCmd.SetWarnings False Select Case enteredChars ' get letters entered and set value from combo Case "S" Me.cmbCut.Value = Me.cmbCut.ItemData(0) Case "B" Me.cmbCut.Value = Me.cmbCut.ItemData(1) Case "D" Me.cmbCut.Value = Me.cmbCut.ItemData(2) Case "DB" Me.cmbCut.Value = Me.cmbCut.ItemData(3) Case "T" Me.cmbCut.Value = Me.cmbCut.ItemData(4) Case "F" Me.cmbCut.Value = Me.cmbCut.ItemData(5) Case "FS" Me.cmbCut.Value = Me.cmbCut.ItemData(6) Case "FC" Me.cmbCut.Value = Me.cmbCut.ItemData(7) Case "FSC" Me.cmbCut.Value = Me.cmbCut.ItemData(8) Case Else 'do nothing End Select enteredChars = "" DoCmd.SetWarnings TrueEnd IfEnd Sub
In my forms I would often like to move forward or back a records, usually a date by keyboard alone.
The keyboard arrows are good but they are normally used to navigate along a line etc.
Page Up & Down again better & often used for moving between records but do sometime need there native functions.
Trying to avoid changing the functions of these keys depending of what part fo the form I am on or current function I an doing.
It would have been great if there was a Alt Left or Ctrl Left that gave a different ansii.
Alt N - next, Alt P - previous, not pretty.
Yea yea I know, another one...
But the way I see is that I haven't asked them all so its ok... :p
Right basically, I only want to allow input of Y N or P into a text field. I thought it would be best to do it with an onkeypress event as I know of no way to block certain characters in a text field with an input mask.. this is what I came up with but it doesnt seem to work...
If Not KeyPress=78 Or Not KeyPress=80 Or Not KeyPress=89 Then KeyPress = 0
Any ideas?
Is it possible to return a value from a subform to a table on the click of a button?
View 6 Replies View RelatedHere is my sample DBA
I'd like to solve this issue
when I open my Quotations form I'd like a set of services to be selected by default, ex: Brush and Pen. So the user only has to input the quote amount
is there anyway to have the form open with a script like:
"on open (or on load). in subform SELECT refproduct where product from tblproducts = 1 and also SELECT refproduct where product from tblproducts = 4"
Therefore when my main form opens, in the subform I have already Brush on the 1st line selected and pen on the 2nd. My user only has to type the price.
Thanks for your much appreciated help
I have a textbox on a subform and I want to get the sum in a string as follows.
Code:
Dim s1 As String
s1 = Sum(Forms!CountItem!CountItemLastCount.Form!ThisCount)
MsgBox s1
When I use the above I get an error message saying - Sub or function not defined and it highlights the sum part of the equation.
I have been using the sum criteria in a textbox but if the user doesn't tab of the box then it doesn't see it as being updated.
I have tried me.dirty and everything else that usually works like send keys tab event, requery form and controls, a left mouse click but nothing is working, therefore I thought that code to actually update the textbox may work.
I have a form with a field within it called ID number, another table contains the ID number with a person's name next to it. I was wondering how I can make it so that in the form, when the ID number is entered, the name of the person also shows next to it and does so automatically for each different record. I am pretty sure that a subform is needed however it doesn't seem to work for me so I must be doing it wrong. How would I do this?
View 1 Replies View Relatedi have aform which class module where i make 2 queries the first works fine but the other always return values with zero my select syntax is in clsschool and the query is
Code:
strSQL = "SELECT tblgrade.Grade, tblClasses.NoOfclasses, tblClasses.NoOfSessions " & _
"FROM tblgrade INNER JOIN tblClasses ON tblgrade.IntGradeId=tblClasses.IntGradeId " & _
"WHERE tblClasses.intschoolinfoid = " & intId
I have a function which I want to return the value of a field.
Public Function fieldValue(tblName As String, fldName As String)
Dim drs As Recordset
Set db = CurrentDb
Set drs = db.OpenRecordset(tblName)
fieldValue = drs.Fields(fldName).Value
drs.Close
Set drs = Nothing
End Function
I need to return the value obtained, for a specified User identified with a numeric variable.What is the best way forward? - Some sort of filter or DLookup and how to code this?
if there is a VBA command that returns the current view of the current active report. I am running code the uses the SetFocus Action, which works fin in Report view, but when I try to go to Print Preview view, Access throws an error stating that the command or action is not available in the current view - and the GetFocus action is the culprit.I can skip the GetFocus action if I know the Report is in Print Preview mode.
View 1 Replies View RelatedMy combo boxes are not returning the actual combo box values back to my table, instead in the table it is displaying the combo box data list number i.e 1,2,3,1,5,1 etc where it should be displaying a property address.
View 2 Replies View RelatedWhich function in access return the the last value in a string.
Period 1 Period 2 Period 3
10 20 30
I need the function to return 30.The reason behind this I have different periods for categories and my formula I'm using needs the ending value.
I would like a field's default value to return the date of the previous Monday.
For example:
Now = Tuesday, 08-Apr-14
Return Monday, 07-Apr-14
Further example:
Now = Saturday, 12-Apr-14
Return Monday, 07-Apr-14
I am wanting to make a text box on a form, to return a number (amount of records returned by a query)basically so if the query returns 5 records, the text box on the form will show"5",
Lets say the form is called "A", and the query is called "B" .How do I put this in the source control of the textbox ? < if this is right too ?
I'm using Dmax() to return a max number in a field which I then want to inc by 1 for a new record. Dmax is returning 999. I believe Dmax therefore thinks it's a text field. So where do I change this to a number field?
View 2 Replies View RelatedI have a subformClientOffers on my frmAllProperties. On the subformClientOffers is a field called Outside Agents. This field allows for multiple values to be selected.
The subfrmClientOffers is in datasheet view.
While the field Outside Agents DOES allow me to select more than one, they post in the field one after another:
Ken Shaw, John Doe, Jane Doe, Harlan Bestlyn
Therefore, the datasheet view of the subformClientOffers causes the field Outside Agents to get very long, much too long to view without scrolling. My client wishes for everything on the frmAllProperties to be viewable without scrolling.
Is there anyway, to cause the field Outside Agents to place a return between each selected name (sort of a wrap text kind of thing)?
One thing I might mention is that the field is a drop down field from tblOutsideAgents. The table itself has First Name and Last Name, but I concatenated that into Fullname on the form, so that when the user opens the drop down they see the entire name. I don't know if that would have any effect on making the 'return' thing work or not.
I can't use this field as a subdatasheet because I already have one subdatasheet attached to the subform to show multiple notes on each Client Offer.
I have a table with Zip CODE field. I uploaded my information to this table form an excel file. There were over 120K rows of data so no way i could do this in excel.
So I found that some of the ZIP codes are either blank or have less than 5 digits.
Can I build a a query with the ZIP code field that will return all zip code records with less than 5 characters or blank. I'd like to repair these zip codes and a update query will be my next step.
I repeat excel is not an option because when I try to sort by the Zip Code column my computer explodes (okay not literally) ....
I have a simple UDF that takes a string and returns a variant, which is an array of strings Example Input "Brick Wall" Return value would be a variant array with first element "Brick" and and second element "Wall" Now I have a table with a field of strings, and I want to make a query that returns all the results from the function, one per line.
So if my input table looks like this
[strField]
"kick the ball"
"return the pass"
my query result should looks like this
[Orig] [new]
"kick the ball" "kick"
"kick the ball" "the"
"kick the ball" "ball"
"return the pass" "return"
"return the pass" "the"
"return the pass" "pass"
Last time I had to do something like this I used VBA exclusively, with ADO objects, but I thought a query based solution would be easier.
With my current data the largest return array size my function returns is 27 elements but I wouldn't want to rely on that number being fixed.
I'm having Table with some universities name and i want web link address for all universities. Take university from table1 in column1 and search on google page and return first link of the search page and save into column2...
View 1 Replies View RelatedHi:
Using MS Access 2000.
Maybe I've been looking at the monitor for too long but... I need to have a query return data based on a date field or return all dates greater than 1/1/2001 if left blank.
criteria: [Enter date - mm/dd] Or >#1/1/2001#
When I leave it blank it gives me all dates as it's supposed to but when I type a date it does not filter by that date, I still get everything.
I also tried [Enter date - mm/dd] Or Like "*" but it behaves the same way. I know it has got to be easy but my skull may be too thick to let me see it.
Any help is appreciated.
:confused:
I have created a form and a subform from a table.Initially I created a table with 11 rows. After completion of my project I added an extra of 480 rows to the main table. But the newly added rows are not coming in my subform.
Main : Main table (It consists of around 491 rows)
MForm : Main Form (It shows of only 11 records which I was 1st created)
How to refresh my subform inorder to display all the rows.
I have a db for my clinic with 3 tables, one is Patient (P_ID, P_Name, P_Age, P_Sex...etc. The second is Referral (R_ID, R_Date, R_Clinic, R_Diagnosis...etc. The third is Therapist (T_ID, T_Name, T_Division, TherapyDate, T_Plan...etc.
The main form contains all patient info and below I have a subform showing info from both other tables (Referral and Therapist).
Each patient could have more than one referral, so I made the relation between Patient table and Referral table, one to many.
Other relations are as follow:
Patient to Therapist (one to many) because one patient could be treated by different therapist each time he is referred.
Therapist to Referral (one to many) because one therapist could handle many referrals.
Now for the first patient, I entered the first patient info in the main form and then the referral and therapist info in the subform, then the same patient was referred to me for the second time, when I attempted to enter the second record (referral) in the subform I am not able to. Why I do not Know, I am sure I did something wrong.
By the way most of the fields in the subform are comboboxes except for dates.