I have a database where I have a number from a client. We copy/paste it from a pdf file. The number has dots in it (1.00.00.000). I would like to create a solution that when I paste the number in the field and go to the next field, it will take out the dots from the number.
I have a form for rentals where I have fields for car details and for client details. I have a list box for clients so that when I enter the Client Id I automatically get all the records filled out on the form, from the clients table...
This works but the problem is that sometimes I have a new client who rents a car that is not on the database so I insert the client details manually on the rentals form without filling in the client ID as this client does not exist on the database.
The problem comes when I want to save the form it wont allow me to leave the client ID field blank... I imagine this is because of the relationship...
I have a downtime database that tracks units down, time on, reason down, etc. When a unit goes down, I log the name of the unit and the time down in separate fields. When a unit goes back on line, I log the time on and the reason in separate fields. All this is in a form. When the unit goes on line, I want the user to be forced to enter a reason only after he has entered a time on, not before. The “reason” field must be left blank until the unit is on. How do I do that? I have searched the forum for this and have not found leaving a field blank based on another field’s data. I will supply whatever you need to help me. Thank you.
I'm pretty new to Access, so please overlook any stupid questions :) I have a data entry form that has one field that cannot be a duplicate. So, in the table I have it Indexed with No duplicates. The problem is that the form doesn't notify the user that they have entered duplicate information until they close the form. So the 10 minutes they spent filling it out is wasted. So, after consulting various posts, I did a BeforeUpdate event with the following code: (the field that must be unique is called "LS Number", in the form "Q and D" based on the table "Q and D Database")
Private Sub LS_Number_BeforeUpdate(Cancel As Integer) On Error GoTo LS_Number_BeforeUpdate_Err
If (DLookup("[LS Number]", "Q and D Database", "[LS Number]=Forms![Q and D]![LS Number]")) Then MsgBox "The LS Number you entered already exists. Enter a unique LS Number", vbInformation, "Duplicate LS Number"
When I test this by entering a duplicate LS Number, it gives me the error "Type Mismatch." Unfortunately, I have no idea what this means, nor do I know how to fix it.
I had two fields in my table which I previously used in the form. I deleted the fields from the form itself but the fields are still listed under Field List and not even under any table...
Delete buttons doesn't work on it, and neither does backspace?
How do I remove it? Right click only gives me two options:
"Add Field to View" or "Edit Record Source" which returns an error saying this command cannot be used.
GOAL - I would like to have one text box where I enter a sentence
txtKeywords: Access Is For Smart People Smarter Than I
I would like to create a button when clicked moves txtKeywords into another textbox [txtKeywordscombined] field and removes the spaces between the words and adds hyphens
They are the small green rectangular things underneath a users number of posts. In most forums they are used as a ranking system judged by a users number of posts.
im responding to the code you submitted to draw lines on a form. I am trying to change it a bit to only draw dots. I have x and y cordinates that I want to draw on the MS form kinda like a scatter graph. So I want to pass values from a table into the function LineX. Then have the function create dots that draw on the for to corespond to the x and y Cordinates. I was wondering if you could help. thanks in advance
here is the original code Option Compare Database Option Explicit
Private Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, _ ByVal Y As Long) As Long
Private Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, _ ByVal Y As Long, lpPoint As Any) As Long
Private Declare Function apiGetDC Lib "user32" Alias "GetDC" _ (ByVal hWnd As Long) As Long
Private Declare Function apiGetFocus Lib "user32" _ Alias "GetFocus" _ () As Long
Public Function LineX(Ctrl As Control, X As Long, Y As Long, cx As Long, cy As Long) Dim DC As Long 'device context Dim hWndCtrl As Long 'bounding control handle hWndCtrl = fhWnd(Ctrl) 'get control handle DC = apiGetDC(hWndCtrl) 'get control DC MoveToEx DC, X, Y, ByVal 0& 'set starting point LineTo DC, cx, cy 'draw line from starting point to cx, cy End Function
Private Function fhWnd(ctl As Control) As Long 'use getfocus to retrieve ctrl handle On Error Resume Next ctl.SetFocus If Err Then fhWnd = 0 Else fhWnd = apiGetFocus End If On Error GoTo 0 End Function
I've been using MS access to lift some text files for a number of years
I have now got an issue where by the new machinary is very clever and has alittle server to collect the data. Machine1_127.0.0.1, Machine2_127.0.0.1
Previously I picked them up via ftp and downloaded the data into a text file called Machine1.txt
Now I can run a server where by the Machine1_.txt is created locally on the processing machine
however the software included ( which I can't change) just creates text files like so Machine1_127.0.0.1 and now the link doesn't work when I create the link access throw this:
"Microsoft Jet Database engine could not find the object c:Path to fileMachine1_127.0.0.1.txt. Make sure the object exists and name and Path are correct"
If I manually copy the file and rename it to machine1.txt all is good
Any offers/thoughts or suggestions, the path is quite deep at present and that could be changed.
I can't import the files either? unless I rename them and at the moment I am doing this through the interface
I do a query to remove "." from a list of my servers. This works great, but for every name on the list without a "." I get an error in the output. Is there any way to remove these errors from the output, so I only see the data that has been properly pruned down?
This is, I think a very easy question: What would be the apropriate form event to use when leaving a record on a single form (When you press next record for example)
I made a Table with one record per person which is entered initially and contains a sub-table which is a list of the drugs they are taking. As people are notoriously bad at spelling drugs they select them from an alphabetacised drop down list held in another table. The idea being that they check the spelling before entering them on the main table for any new drugs. The subjects each come back and have a number of measurements taken on a number of visits. So the main table and the drugs table have a one to many relationship and the main table and the visits. In both cases the tables are linked by the same unique identifier which is compulsory and unique in the master table. The data is input using a master form and sub-forms. I havent done any of the input but when I looked at the two sub-tables they each have a number of records which are blank in the identifier feild. How has this happened? How do I stop it happening and is there any way of finding out which record these visit data and drugs should belong to?
Hey guy im kinda new to this program so excuse me if my question is simplistic:I built a form for making Purchase orders. In the main form...a user enters a bunch of text/num info (name, address, ect)into the table. After that i have it tab to a subform..where a user can add items by line (as many as they like). All good till here: Once i go to click out of the subform...i get message "You cannot add or change a record b/c a related record is required in table 'UCT_Req'"My relationship has a 'one-to-many' link (the req number to the many line items). I have auto-numbers counting up in each table.My main problem seems to be attaching the entered line items to a specific record in the main Purchase order form...and then opening a fresh form afterwards. Any hints?Thanks folksSTeve
I am trying set up some criteria for a create table query. I am using multiple fields from different tables, I am trying to delete certain feilds if they meet the criteria. I am using iif([letter c_last]=[letter a_last],null,[letter c_last]) in the criteria for letter c last, but when I run it a box appears to enter criteria for the last name field? I want it to look at the field not for data to be entered manually. I hope this makes sense. Any help would be greatly appreciated.
I have a table that for some reason when I imported the data, placed some spaces before about 75% of the numbers in only one column. I need these numbers to be exactly the same as in another table because I use this number to compare to records and import other data depending on the corresponding numbers.
I tried doing a find and replace, but for some reason it doesn't find the spaces to replace. If I type in the space and the number, then in the replace with type only the number, it works. But I cannot do that since there are literally 10's of thousands of different numbers.
Someone mentioned a "LTRIM" command. Does this work within Access and if so, how does it work?
I have a SearchResult Form, it only display search results. one of the field in this form is a LookUp field (Nationality).
and LookUp fields, as you know has this arrow next to them.
and since this form display only the results, i don't need this arrow. how can I remove it?
i tried using a text field, but it will only display the code of the nationality because the discription is in another field (that's why I used a lookup so I can select the discription in the Row Source) and text field dosn't have Row Source.
explain me the Query Expression to remove the first 7 characters in a column, to rum a Query.Eg - I have entry like - 4/8/11-Pipe...I need to return the result like "Pipe".How to build the query.
I have a field called "SC" with a value 13-251. I need to remove the "-" ending up with 13251. I tried using, as a starting point, Mid(String, Start, Length) with no success. I found this in another topic, and thought this might be close to what I was looking for. I sure did not know how to use it. When I selected the run command I got the following response:
Query must have at least one destination.
I tried a few different things like adding an extra field and different pointers but I doubt if I'm even standing in the batters box.