This is something very simple, but I am messing it up terribely. If someone could please help me out with this.
I have a form which has a combo box. This combo box contains a list of Query names. What I am trying to do is simpely, when you highlight on any of the query names and click the run query button it should fire the query the result should be displayed in the datasheet view. I am not able to get a hang on how to do this.
It would be really helpful if someone could help me out with this as i need to get this done ASAP.
I currently use this code to trigger a not in list event, ask the user if they want to add it to the respective table, and then add it.
I'd like to be able to add the text in the combo box that triggers the event to show up in the msgbox.
Private Sub cboCategory_NotInList(NewData As String, Response As Integer) Const Message1 = "The data you have entered " & me.cbocategory.text &" is not in the current dataset." Const Message2 = "Add now?" Const Title = "Unknown entry in CATEGORY Field..." Const NL = vbCrLf & vbCrLf
I have a form frm_GlobalSettings with a combobox cmbDescription that finds a record based on the value selected. The row source type for cmbDescription is Table/query, and the row source is a select statement on the form's underlying table.
I want the user to be able to use cmbDescription to add a new record to the form's underlying table. I currently have
Code:
Private Sub cmbDescription_NotInList(NewData As String, Response As Integer) Dim strTmp As String 'Get confirmation that this is not just a spelling error. 10 On Error GoTo cmbDescription_NotInList_Error 20 strTmp = "Add '" & NewData & "' as a new global setting?"
[code]....
but when a new value is entered this errors on line 70 with "runtime errror 2118 - you must save the current field before you run the requery action".I've tried various ways around this but can't get it to work.
Hi, I'm new here and I thought I had already posted this but i couldn't find it so I am posting again... sorry if I've posted twice
When I pass a value from MyTextBox to MyComboBox using:
Me.MyTextBox = Me.MyComboBox
It does Not trigger the AfterUpdate Event of the ComboBox
I need it to! Any Suggestions??
I have tried: copy and pasting by but that creates a problem
Me.MyTextBox = BarCodeData$ 'passes the variable value to MyTextBox Me.MyTextBox .SetFocus Me.MyTextBox .SelStart = 0 Me.MyTextBox .SelLength = Len(Me.MyTextBox ) + 1 SendKeys "^c" 'copies the value of of MyTextBox
as soon as I add the below line, it no longer copies the value in MyTextBox Me.MyComboBox.SetFocus
The onEnter Event of MyComboBox has the following code that works fine.
If I ran all the code above, all works but the "Copy" and thus anything that may be in the clipboard is pasted into MyComboBox, and the AfterUpDate of MyComboBox triggers.
I know that there are compelling reason NOT to use the SendKeys but I was just trying something
What I'd really like to do is eliminate MyTextBox and pass the Variable directly to MyComboBox:
Me.MyComboBox= BarCodeData$
And have it force the AfterUpdate Event of MyComboBox
I have a basic form linked with a subform inside of it. The main form has a list of customers in a combobox and the subform lists all the things they have ordered from us. This all works perfectly fine, I can add data to the list of things ordered and it's ok.
I decided instead of using a whole extra form to add customers I'd just have a not in list event and allow users to add customers through there, bit more intuitive and cut down on forms.
It works to certain extent except one small problem, if I add a customer I have to close and reopen the form to be able to add/remove data from them in the subform. If I leave the form open and try to enter in data in the subform immediately it just shows whatever customer I had last on the combobox and adds it to the last customer as well.
It works perfectly fine if I reopen it so I thought it was some kind of query or update snafu but all the VBA code examples I found don't seem to do anything. Not exactly sure where to go from here.
PHP Code:
Private Sub cboDept_NotInList(NewData As String, Response As Integer)     Dim oRS As DAO.Recordset, i As Integer, sMsg As String     Dim oRSClone As DAO.Recordset     Response = acDataErrContinue     If MsgBox("Add dept?", vbYesNo) = vbYes Then         Set oRS = CurrentDb.OpenRecordset("tblDepartments", dbOpenDynaset)
I have a combo box with three columns, the first one is the bound one, the second is text in English, and the third is text in Spanish. Currently when the form is open, both the English and Spanish texts columns are visible. What I would like to do is set up a command button on a different form that will open the form with just the English showing in the combo boxes, and another button for Spanish. I've tried the following code which opens the form, but the combo box is disabled altogether.
I am trying to write a code that will execute at the change even of the combobox/Listbox and when a character is typed in it then all the data from "DocumentType" field whose first character matches with the first character typed in Combo/Listbox will be stored in it.
The following code doesn't work:
Private Sub ComboBox4_Change() Dim strText, strFind As String strText = Me.ComboBox4.Text If Len(Trim(strText)) > 0 Then strFind = "BarcodeRef like '" & strText & "*'" End If
I have set up a standard form using asp code, the data currently get emailed to the address i requested, i also need this data to go in a database. any tips.
Does anyone know what VBA code I use in Access 97 to capture the mdb file name of the database I am currently in? I need to enter into a field on a table.
i was told that i didnt need to store the string value day.. eg.. monday.. tuesday.. because access can retreive the day based on the date..so...i have a textbox on my form that displays the date as follows..23/12/2006i am basically creating a html email and at the moment i use the following.. Option Compare DatabasePrivate Sub Command254_Click()'References: Oulook LibraryDim strEmail, strSubject As String, strBody As StringDim objOutlook As Outlook.ApplicationDim objEmail As Outlook.MailItemSet objOutlook = CreateObject("Outlook.application")Set objEmail = objOutlook.CreateItem(olMailItem)strEmail = Me.txtbookeremailstrBody = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'><html><head>" & _"<meta http-equiv='Content-Language' content='en-gb'><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head><body>" & _"<p>" & Me.txtjobdate & "</p></body></html>"strSubject = "London Heathrow Cars - Booking Confirmation"With objEmail .To = strEmail .Subject = strSubject .HTMLBody = strBody '.Send 'Will cause warning message .DisplayEnd WithSet objEmail = NothingEnd Subthe email displays the date as it stands in the textbox..is there a standard method in access i can use to convert..23/12/2006 to Saturday 23rd December 2006??
I have a form to add data. I have a cmdbutton to output a shapshot of a report via e-mail. I have noticed that the shapshot does not capture the data I have just entered on the active form unless I don't first close the form.
Is there a way I can capture these active records?
I need to find out which emails in our database have our domain emails mispelt incorrectly.
For example, our domain email should be miguelangel.duo@leoburnett.es but it may be mispelt miguelangel.duo@loeburnett.es. How can I run an SQL that return the
FirstName, LastName Email from the Extract080907 table with mispelt email domain names?
I need to create or adapt from a similar database a means to capture time (labor) spent on projects. I've searched for this topic, but have come up empty. Perhaps I'm just not searching on the correct search terminology. Here are the basic requirements:
One department can have many employees, but each employee is a member of only one department. An employee can be transferred from one department to another, and records created when the employee was a member of department 1 need to be retained under that department, while records created after the employee has been transferred to department 2 need to be recorded as such.
Projects can be worked on by any employee in any department. Many employees can work on any project.
Employees need to log in to the database daily and report the time spent on each project. A list of all projects needs to be displayed with the ability to enter the number of hours spent on each.
Reporting to include grouping of employees into departments; time spent by a department in total on each project; who worked on which project and total time spent.
There is a management shakeup here and I'm under a lot of pressure to get this done. I've done a very simple database, but nothing as complex as this.
I am nearing the endgame of a FE/BE app. The FE will sit on various PC's across a LAN. IS there a way that when a user opens a record (via a form) on his FE (on his PC), the IP addy of that PC will be automatically entered into a hidden field on the form and store it in a purpose specific field on the BE table.
So I guess my question is how do I get the IP into a field on a table? Either "default" in the table, or via a field on a form? And what would the syntax for such an auto-populate be?
Not sure whether this really belongs in the Forms, or VBA or forum, picked Forms because I think it stems from that, despite probably involving VBA in the solution...
I'm getting used to using filter by form and find it quite useful for those off-the-cuff queries, however, it is possible to 'capture' the records so that the results of the filtering can be passed to a readymade report (so that they can be printed out in a more presentable manner than the table view)? (To what would the Record Source of the report be set?)
:) Hi Guys, I have a small problem, hope you can help me out. I have created a a form in Access for data entry. But I would like the form to capture the data and time and the user who's entering the data into the form. How do I do that. Been trying to figure it out:rolleyes: . Hope you can help. Attached is the screenshot of the form I created. Thanks a bunch
Simply put, I want to create a form to which I can enter a raw SQL statement (such as: SELECT * FROM contacts without having to create a new Access query.
The way i have tried to do this is by creating a form which uses an onclick function to pass the string variable (the query statement) to a sencond form and have the second form run the statement. I can pass the variable ok but I cant figure out how to the use the variable string in the second form to execute as the "Record Source" of the form.
I am developing a Student Database that shall capture Biometric and Pictures. I got the fingerprint on an access form. However I cannot get image directly from the webcam to an access form. I have to use the manufacturer's software to capture the image before importing to access using .picture property.
Is there any way of capturing the image directly from the cam to an access form?
I have a query which exports to a excel file afterwards, however, it's not capturing all the data I need.My query is at the bottom, and I think the problem is the "(([tbl Master].ID)=[tblRequest].[Cost Centre]))" statement, as this means that it'll never pick up a Cost Centre starting with "Z", as they don't exist in [tbl Master] (they're exceptions to the rule basically).
What I need to do is only parse the statement "(([tbl Master].ID)=[tblRequest].[Cost Centre]))" if the Cost Centre doesn't start with "Z", if it does, then it'll find it in the table, as there's validation on the point of entry that don't start with it.
Code:
SELECT tblRequest.RequestID, 'N/A' AS [Week No], tblRequest.[Refund Date] AS [Date], tblRequest.Requester, tblRequest.Authoriser, tblRequest.Refunder AS Processor, tblRequest.[CRIS Reference] AS [CRIS Ref No], tblRequest.[Customer Title] & ' ' & [Customer Name] AS [Customer's Name],
Is it possible to capture a form's filter? In Access 2013, I have a form (from a template database) listing contact information. I can set filters by clicking on the column headers and selecting which records I want displayed. There is also a button to run a mail merge with Word. I want the merge to only include those records displayed on the form at the time it's run.
Let's say I have three columns; apples, berries and bananas. I need to capture, either using the GUI or the SQL if any of those are not null, then bring that row back. So the rows that come back from the query are only ones where one of those three columns is not null.
In excel it would be if(or(apples<>"",berries<>"",bananas<>""),X,Y)
I have a form where there are many users to enter or update data. I need to capture the username who created a record , then , on form load , I want system to check for username if it is same as the creator of a record , then allow update , otherwise don’t allow update , but allow only adding new records. How can I do this
Need a formula which can capture filename for me. For example, I have a db saved at "C:DlocationofficeChina.accdb". Is there a way to capture "China" in a query?