I have an entry Form which is used to record prospective new members of a society in a Table named 'Foreigners' in a Membership Database using Access 2010. The entry form also records the name of the 'Interest Group' to which the prospective member is initially affiliated.
On entering this Group Name, selected from a drop down list from the Groups Table, The Group ID & Leader Member ID are automatically recorded.
However, I don't wish to record the Leader Member ID, what I wish to record is the Leader's Member Name which is identified by that ID in the related 'Mail List' Table.
In the Properties sheet the relevant source for this field is shown as Leader, but what is displayed is the Leader ID...
I want to use the same form in datasheet mode for data entry and retrieval. When retrieving, all controls are disabled and locked. I am trying to enable and unlock them for modifying but that isn't working.
Why does my sub form which is contained in a Tab, not display unless a certain field is populated with something? It's not a required field. Infact it is one of two identical fields... a relationship and a lookup to another table. It doesn't matter if the second one if filled in or not. Just this one. The record is in the database, I choose from a drop down in the header... and the subform then requeries and displays the information. However, unless this 1 field is filled in.. the subform remains blank. It is getting on my nerves!!
I build the WHERE clause in my form's record source dynamically, depending on the context in which the user opens the form. I can't put the WHERE predicates in the record source and refer to fields on another form, as the context will determine which predicates are required. So I have code like this:
Public gf_FormInstance As Form Dim strSelect as String : Set gf_FormInstance = New Form_F_PerformanceSummary : gf_FormInstance.RecordSource = strSelect gf_FormInstance.Refresh gf_FormInstance.Visible = True
The problem is, the Set statement causes the New form instance to retrieve all records from the existing record source, slowing down the performance.
I'd like to find a trick to suppress the retrieval of records when the Set statement executes, and then allow them to retrieve when the Refresh statement executes.
I've got a query pulling data from a view I created that gives all the data I need. The query gets it's criteria from a form with 10 combo boxes, a radio box with 3 options and 2 date fields for the timeframe to run the report in.
The issue: over half the columns of data that the radio buttons can limit results by have null values but only two of the columns are excluding records where the values in them are null. As any combination of the combo boxes are null I'm using the following format for my criteria per column IIf(IsNull([Forms]![Margin Dialog]![InstallerOption]),[Installer_from_Web],[Forms]![Margin Dialog]![InstallerOption]) That is an example of a column that works, the following is a column that is excluding null values no matter what I do IIf(IsNull([Forms]![Margin Dialog]![AOIOption]),[ProductType],[Forms]![Margin Dialog]![AOIOption]) I am not seeing the error and could use some thoughts.
Ok, I know you guys have heard about this problem quiet a few times, my search told me that. But my problem has a bit of a twist. The message appeared when I tried to open the database yesterday, so I went to the backups and tried to open them. All the backups for the past month give the same message. The problem is with the FE only, the BE is working fine. The backups are connected to the same workgroup as the FE and BE. Has anyone seen this before and know what might of happened?
I am not sure whether this is a problem with MS Access, Visual Basic or Windows.
I have taken over supporting & developing an MS Access 2000 DB for a small charity & am not an Access expert or a programmer. The Application includes processing to create, amend & store retrieve standard letters based on a Word document called MyMerge.doc. The operating systems is Windows XP for the PCs with a MS Server 2003.
Each letter is allocated a number ‘CallID’ which is used to retrieve the letters later. The letter text is in MessageC.
The VB code to store the letters (Save As) is
Dim strTest As String, db As DAO.Database Dim td As DAO.TableDef Set db = CurrentDb For Each td In db.TableDefs If Len(td.Connect) > 0 Then MessageE = Mid(Left(td.Connect, InStrRev(td.Connect, "") - 1), 11) GoTo jumpout Next jumpout: MessageC = "%fa" & MessageE & "Db Letters" & MessageC & " " & (CStr(Forms!Contacts![PostalCode])) & " " & Trim(DLookup("[TitleType]", "Title Types", "[TitleTypeID] = Forms!Contacts![TitleTypeID]") & " " & Forms!Contacts![FirstName] & " " & Forms!Contacts![LastName]) objWord.Application.Activate SendKeys MessageC
The VB code to retrieve the letters is
Dim MessageE As String, db As DAO.Database Dim td As DAO.TableDef Set db = CurrentDb For Each td In db.TableDefs If Len(td.Connect) > 0 Then MessageE = Mid(Left(td.Connect, InStrRev(td.Connect, "") - 1), 11) GoTo jumpout Next jumpout: Dim WordApp As Word.Application Set WordApp = CreateObject("Word.Application") WordApp.Visible = True WordApp.Application.Activate MessageE = "%fo" & MessageE & "Db Letters*" & CallID & "*.doc" SendKeys MessageE Set WordApp = Nothing GoTo Exit_Command53_Click
The success rate varies from PC to PC and user to user. It will work with one letter and not the next. It is very difficult to identify a pattern. When the Save As does not offer the expected name & path, the Application (or operating system?) offers to save ‘MyMerge’ to the user’s My Documents folder.
In that case I tell the users to correct the path themselves and save the document under the CallID. Theoretically, retrieval should work since this uses the CallID and wild cards. Sometimes it does but often it will instead retrieve a document in the user’s My Documents folder. If it does go to the right folder, you sometimes have to replace the last wild card with ‘.doc’. I have tried replacing the last wild card in the VB code with ‘.doc’ but this does not work!
Finally, I alone get the message ‘Save failed due to out of memory or disk space’, neither of which is true. This makes it very difficult to continue investigating the problem. If I use a copy of the DB on my hard drive rather than the network I can save but not retrieve.
I am trying to build a database for my digital photo collection. (having pretty much gven up on the packages I see in the market)
Since most of the images reside on CD's and DVD's, I want to create and store thumbnails and pointers (ie. location fully qualified name), rather than a copy of the full image.
1. How do I define the fields in the table for the thumbnail, and the pointer? 2. How can I use the pointer value to retrieve the full image?
I want to retrieve data from 2 columns using only 1 search option. At the moment I have 2 ID fields which contain various numbers. My data retrieval functionality only retrieves data on either one column or the other using 2 search buttons. So for example, if they want to retrieve data on ID column1 they have to click the button named this and if they want to retrieve data on ID column2 they have another button for this. What I want to do is when the user clicks the button I want access to prompt them for an ID number (only want 1 prompt). Once the ID number is input I want access to search both columns for the ID number and return it. Any ideas on how this can be achieved plz?
I'm very confused. I have two tables in my db that should be the same except for columns(I copied one table from the other). In each I have a "default" entry as the first record in the table just to prevent my select queries from erroring out if they don't find a match for the criteria. When I use the following statement, Code:SQL="SELECT ID, Name, Picture FROM background WHERE Name ='" & Fname & "' OR Name='Default'" it returns the default value as the record, not the match for "Name", even though there is one(when I remove the OR Name='Default' it pulls the record).
When I use this query for the other table from the same .asp page, Code:SQL="SELECT ID, Date_Time, URL, Icon, Title, Description, Status FROM Submission WHERE Technician ='" & Fname & "' OR Technician='Default'" it returns the record where "Technician" matches even though it is below "default" in the table.
I want the query to return the "default" record only if there is NO match for the first criteria, which it does in the second case, but not the first. Is there some way to force this? Thanks in advance for any assistance provided! -Chris Gordon
Ever since I switched from using a Mapped Drive to using the UNC path for my linked tables, i occassionally get Unexpected Error (40230).
I noticed this first when i manually re-linked using the link table manager, it linked the tables, then gave me this error several times, likely reflecting the number of tables i linked, but the links refreshed.
I then noticed this error when i used the acCmdZoom method on a textbox control on a continuous form. It opened the zoom, then gave me the same error several times, likely reflecting the number of records on the form, (i just hit the esc key to scroll through all the errors quickly.)
Any thoughts would be much appreciated,
*** UPDATE, Ok, I just did a Linked Table Manager again, got the error 112 times (or so), which is nowhere near the number of tables linked. After the error occurs once, and you perform that operation again, the error does not happen. Same thing when zooming, the error occurs sever dozens of times, but when i perform the zoom again, it does not repeat the error.
I am trying to run a Query that searches for a single Tool ID Number and returns the transaction record that has the latest date. My query currently is this:
SELECT LocationStatus.ToolID, LocationStatus.CurrentLocation, LocationStatus.DateofEvent FROM LocationStatus WHERE (((LocationStatus.DateofEvent)=(SELECT MAX(dateofevent) FROM [LocationStatus] AS t2 WHERE t2.[ToolID] = [Tool Number])));
But the problem I am having is that the query is returning MULTIPLE Tool ID numbers with matching dates. Before the query runs a parameter box pops up asking for a Tool ID number but there should only be one record returning. HELP!!!:confused::confused:
Why I getting an error when trying to run the below code ? If I take out
Me.ClientNameList.Column(1) = rs.Fields("[Tracking Date]") Then . . .
add "And" to
If Me.ClientNameList = rs.Fields("[Client Name]") . . .
I do get a record, but with the wrong date. I need to match the client's name and tracking date, then move the related fields to a MS Access form.
The code follows:
Private Sub ClientNameList_Click() Dim db As Database Dim rs As Recordset Dim i As Integer Set db = CurrentDb Set rs = db.OpenRecordset("Progress Tracking")
I have the following tables, tblAudit and tblCriteria. The first records companies and period of audit, the second contains the criteria against which they will be audited. The audit period determines which criteria apply. Results are recorded in a third table, tblAuditResults.
My problem is when I try to add a new result by selecting a criteria via a combo box a new row is inserted in the criteria table as well as in the result table. Inserting a row in the criteria table is wrong.
A report field data is sourced from a query which displays its values as a string eg "George Renee", however in the reports it displays data as a number eg 42. It is true that the query field obtains its data from a table which gets its data through lookup Wizard. I really want the report to display string type.
Our organization (a University) has been engaged in becoming "paperless."
As part of that initiative, we have spent the past several months scanning several hundred thousand pages of documents relating to building systems (HVAC, e.g.) as well a a massive quantity of detailed lead and asbestos surveys and abatement records.
The initiative is indeed reducing the quanity of paper stored in binders and file cabinets, however now it is becomming evident that retrieving some of that information is a real problem for some folks.
At a meeting this morning a question arose about whether we could develop an Access application to retrieve the documents (which are very logically filed on a network share, but it seems to be beyond the compreshension of some staff how to actually navigate through the maze).
My question is this: has anyone in this forum ever tried to implement such a solution with Access?
Any advice or insight would be very much appreciated.
I am getting this error message: "Unexpected Error from External Database Driver" when I try to import some .dbf files into Access. I just did some quick research, and it was suggested that I remove or rename the borland driver. Not sure how I feel about attempting that, plus, where do I get a new borland driver once the old is removed/renamed.
i do a query and outer join this table with a query and it produces LESS records = 3733
:confused:
now i always assumed (never assume it makes an "ass" out "u" and "me" !) that the records would be the same as the table you were joining from, obviously i've assumed wrongly, but why?
the query i'm using as my lookup query is grouped and i think that is causing me problems...if i turn it into a table, it works as expected
:confused:
and i check the obvious: no filters or SELECT DISTINCT...
I have a website which uses a series oif ASP/VBscript scripts to access and update an Access database. It has run for years on a shared commercial service.I also have a replica of the wesbite on my home pc for development and testing running under XP Pro and IIS. All works fine.
Recently I have had to switch my home setup to my laptop (also XP Pro and IIS). The scripts all appear to work ok except when I try to UPDATE certain tables.
Some give "Syntax error in UPDATE statement." Some give "Data type mismatch in criteria expression." Some work without error
Yet the identical script and table on the main site and my home PC work fine and have done for years.
Code: SELECT Reference, InStr(1,FunctionThatReturnsLongString(), ResponsiblePerson) As MyField FROM MyTable WHERE (Reference ='ShouldBeOut' OR Reference = 'ShouldBeIn1' OR Reference = 'ShouldBeIn2')
It returns 3 rows, with values in MyField of 0, 23 and 355.
Now I add 1 more where clause to filter on MyField and the query looks like this:
Code: SELECT Reference, InStr(1,FunctionThatReturnsLongString(), ResponsiblePerson) As MyField FROM MyTable WHERE (Reference ='ShouldBeOut' OR Reference = 'ShouldBeIn1' OR Reference = 'ShouldBeIn2') AND ( InStr(1,FunctionThatReturnsLongString(), ResponsiblePerson) > 0 )
So, you would think that it should return 2 values (ShouldBeIn1 and 2), but it doesn't. It only return the value where the Instr returns value of 23. The one with the value of 355 also disappears. Why would that be? Surely Instr does not return a byte?
I an trying to create a data entry form (IndividualsEntryFm) to input data for fields such as (First Name),(Birthdate) etc., these to be saved to the (IndividualsTbl)
I also have another table (NamesTbl) which has family names etc. The two tables are linked by a (MainID) field. I want a combo box on the individualsEntryFm so that I can select the family name. Then I wish the empty fields for the IndividualsTbl to be available to enter data.When I press the save button I then want this data saved, together with the MainID from the combo box to the IndividualsTbl.
I have set the IndividualsTbl with a (PersonID) field as an auto number each individual therefore has a unique PersonID but may well share the MainID. I'm trying to link many people to the same address.
i have a main form named(EMP) i have a subform named(SEMP)with EMPID i have an another form Named(SDetail) with EMPID i want to open form Sdetail with filter records for data select in subform (SEMP) ,EMPID field Subform SEMP in as datasheet view. i can open sdetail for selected records only
My aim is to have my forms open to a new record, which I have done, but if my users need to then update or edit data in previous entries, they can click a button that allows this.
My thoughts were to add a button, then put in code so that the necessary properties changed the form from displaying a new record or records entered since opening it, to showing all records in the associated table....
As an example there is a table for purchase orders. When clicking on this from the main menu form, it opens up the purchase order form to create a brand new PO. At times though, we will need to revisit an order to attach a copy of an invoice, or update the cost of whatever was purchased.
My db has multiple linked tables. As time passes and work on a project continues data needs to be added to a separate table that is linked to the first table to be populated.
i.e., Initial design data is entered first, when drilling is complete more data is added to a linked table, when drilling is surveyed yet more data is added to the second table.
What I want to be able to do is to query for a particular set of existing design data, display this on a form and on the same line enable data entry to other fields from other tables which are linked to the existing design data.