Is There Alternative For This Code
Feb 22, 2006
The following is loaded in a query:
The field is called CS:
Like [Enter Specialist Last Name Only] & "*"
It works ok, but of course if you don't type anything it will bring all the records up for view, and I don't want that to happen. Can I do something that won't make that happen?
View Replies
ADVERTISEMENT
Dec 15, 2005
I am having multiple user problems with access 2000 quite frequently, and I thought that replication would solve this, as it stands however its proving difficult to get my hands on the developer edition, just wondering, is it worth the hassle to get it, or is there an effective alternative to replication?
View 6 Replies
View Related
Jan 23, 2008
I want to be able to use something like DDESend for putting data into word bookmarks. I already have several instances where this is done with code but I need some others with a simple thing like DDESend.
The problem I have with DDESend is when the form opens a box pops up asking if the Word file is to be opened. I tried with code to first open the Word.doc file and then have the code open the form with the DDESend text boxes but that ends opening two instances of the same Word.doc and the screen all quivers:D
If I just open the form in question and then click OK to open the Word.doc, then close and reopen the form (but without closing the Word.doc, just shrinking it) then all is well. But it is not practical to do that for what is wanted.
Any ideas or an alternative to DDESend. An alternative would need to be simple like a DDESend in text box as it requires someone to be able to easily change field references.
View 2 Replies
View Related
Oct 9, 2007
Hello
I am designing a database in which I have used a lot of listboxes sourced to tables. I need to run queries on the listbox results but this doesn't always work due to the listbox/query issue, (found on this forum).
Is there an acceptable alternative to listboxes as the only thing that I can think of is to use checkboxes which would make the data entry for the end user interesting? (The only way around this would be to have individual databases for each person, this defeats the objective of having a database...)
Many thanks
Loopster
View 3 Replies
View Related
Jun 19, 2007
I have a query worked out with the exact result I'm looking for, but it's kind of slow. Can someone find another way to write up this query?SELECT EID, ShortName, ClassID
FROM (
SELECT Employee.EID, Class.CID, Class.ShortName
FROM Employee, Class
) AS Temp1
LEFT JOIN [Class Attendance]
ON (Temp1.CID=[Class Attendance].ClassID) AND
(Temp1.EID=[Class Attendance].EmployeeID);The inner (green) query pairs every employee with every class they could possibly take (cross product). Then that query is joined with the attendance table to show who has taken which class. If a class hasn't been taken the ClassID will be null like so:EID ClassID ShortName
=========================
111-11-1111 1 ISM
111-11-1111 2 ABC
111-11-1111 BGP
222-22-2222 ISM
222-22-2222 2 ABC
222-22-2222 3 BGPSo is there an easier way to get this result?
View 4 Replies
View Related
Nov 23, 2007
In a table with 5000 records there is a field named "products" with 800 differents products (product1, product2, … product800).
I want to create a new field in a query and mark 100 of these products as "Not available" and the rest 700 as "Available".
For a small number of products I can do this in QBA, using IIf function.
E.g. Products not available:IIf([products] ="product5";"Not available"; IIf([products] ="product10";"Not available"; IIf([products] ="product22";"Not available";"Available"))).
How can I do this for 100 products
Thank you.
View 3 Replies
View Related
Nov 6, 2006
I wish to send a report to the PDF printer driver but DO NOT wish to switch the default printer settings. Having found some helpful code on this forum that changes the default printer to the PDF driver, prints the job and then reverts the default printer back to the original printer device.
I am still using Access '97 and although in the code, the default printer does revert back to what it was originally, the Default Printer status 'tick' no longer appears under Start/Settings/Printers.... Consequently, subsequent print jobs outside of Access go to another device and not my DEFAULT printer.......???
Any ideas would be gratefully appreciated.
Oh - in case I wasnt clear - I want to do this in code NOT using the Print dialog box.... !
View 1 Replies
View Related
Mar 14, 2006
Hi,
Can I use MS Flexgrid in MS access ? When I try to use it, it shows I need licence. Is there any alternate method to use flexgrid or is there any alternative ? Basically, I need to facilitate edit and save option for users. Urgent help required ?
View 6 Replies
View Related
Jul 28, 2005
Hi!
I have a helpfile that I want to open on a Event. But when i use Application.FollowHyperlink I get an annoying warning (the file can contain viruses or in other ways damage your computer) so I wonder if there is another alternative to Application.FollowHyperlink?
Thanks,
Johan Hjalmarsson
View 1 Replies
View Related
Mar 15, 2005
Hi I've got some code from http://www.lebans.com/alternatecolordetailsection.htm
It allows for alternate bands of color to be displayed for alternative records in Forms in Continuous View. I've looked in this forum for other alternatives to this but the only ones that are available change the background of a control rather that display a whole row that is filled with colour. So therefore the background of the row is say in red, the background of the text controls are in red.
I've managed to put the code into my form and download the class. The only problem is that I can't seem to set the colour in the actual class file - it's all a little bit confusing! Can you help? Pleaseeeeeeeeeeeeeeeeeeeeeee........... :D
You can download the sample database from http://www.lebans.com/alternatecolordetailsection.htm
:)
View 1 Replies
View Related
Jul 28, 2006
Hi
I have a custom login screen created for my database and a table with access levels for different users. I am trying to assign user permissions so that certain buttons on the switchboard are visible/not visible dependent on the user security level. As the login screen and the switchboard are on seperate forms, is there any way I can do this??
I've been pulling my hair out since last night so any help at all would be appreaciated
cheers
View 8 Replies
View Related
Apr 21, 2005
I was looking for free access add-ins through a search engine when I came across this site. I'm not sure whether or not some of the more seasoned programmers have seen this, but so far it looks like a less confusing alternative to the security features that access comes with. I'm not in any way advertising this, and I haven't tried it myself yet, so I can't speak about how good or bad it is, but it may be something worth looking into. Here are the links:
http://www.accesswizards.com/Downloads.html This lists the add-ins that are available from this particular site.
http://www.accesswizards.com/SecDetails.html This is the "read me" information about the security add-in.
View 1 Replies
View Related
Dec 7, 2005
I have tried to create an MDE file for my database but can't figure out why it will not let me. I can't don't think I am over the limit in open TableIDs. I have 76 Forms and 91 Tables.
I am setup with two databases - the database with the data is on the server. Is there any other alternative that I can do other than putting the mdb file directly on the client. And if not is there a way to stop the mdb file from constantly growing in size.
View 4 Replies
View Related
Dec 28, 2004
What I am doing, is I have various products with 5 basic fields. I then wanted to add an array of text fields to 2 of those original 5 basic fields. I attempted to do this with a subdatasheet, however, a subdatasheet is not record specific, is not directed to a specific field, and really does not do anything that I want.
Say that the basic field is ProductDescription. I want one column of fields to correlate to it, like below.
ProductDescription
Is blue
Is large
Is heavy
Is strong
Each product will have a different amount of varying descriptor fields. Once understand how to incorporate this with my project, I then will need to understand how to add the subdatasheet to a report easily. Thanks for any help,
-SethTherrien
View 3 Replies
View Related
Aug 28, 2006
If any one can make a suggestion it would be great. I have a list of names with phone numbers, addresses and emails. I thought I could use a combo box to select the name and and have the other date associated with it come up in the appropriate boxes set. I can't get it to work. Does any one have any suggestions on how to make it work or another method that can be used. The out come I want is to allow someone to pic name from a list which will then set the phone number, address and email correct. Ideas would be great.
Thanks Tracey
View 1 Replies
View Related
May 6, 2015
I am trying to avoid to use a Combo Box & a List Box because of the way the records are stored in the table, I only need to verify that the user does not enter a 3 letter code that is not contained in a specific table (I have a table of countries with the 3 letter code example if the user types ESC instead of ESP an error appears) Is it possible to use the after update to verify the contents against a table?
View 4 Replies
View Related
Jul 6, 2012
I have a stock db with records that go back to 2006. I want to clear some of the old records but save them incase required. I still need to leave from 2010 until present on the db. I have a front and back end on the db.
View 1 Replies
View Related
Oct 17, 2014
I've changed my splash screen for a database using the method of creating an alternative bitmap.Is there a time setting for this or an alternative?
View 6 Replies
View Related
Feb 16, 2006
Works great, but when I hit the number "3", (3 times in row) it will let me into the form. I want it to not let me in IF I don't know the password.
Where did I go wrong?
Private Sub Form_Load()
Dim pw As Variant
If InputBox("What is the password?", "Password") = "1" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
If InputBox("What is the password?", "Password") = "2" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
End If
End If
End Sub
View 14 Replies
View Related
Jan 14, 2007
I protect my code from people being able to read it by setting a password on the code from Tools > Properties, selecting the Protection tab and entering a password, and clicking "Lock Project"
Is there a way to write code that will remove that Lock Project check and check it back on?
I've looked through the Application.SetOption command and it doesn't seem to be one of the choices. It would be very helpful if someone knew how to do this.
Thanks
SHADOW
View 6 Replies
View Related
Apr 27, 2005
I have a button that runs a macro to insert NOW() into a text box.
This is how it is coded;
Private Sub Start_transferred_job_button_Click()
On Error GoTo Err_Start_transferred_job_button_Click
Dim stDocName As String
stDocName = "Start transfered job"
DoCmd.RunMacro stDocName
Exit_Start_transferred_job_button_Click:
Exit Sub
Err_Start_transferred_job_button_Click:
MsgBox Err.Description
Resume Exit_Start_transferred_job_button_Click
End Sub
How do I write the code to populate the [start Time] text box with NOW() when the button is clicked without using a macro???
View 1 Replies
View Related
Nov 22, 2005
Need a little help here. I have this code on a command button that open a form that displays a chart. The chart work great as long as there is data to display. However, if there is no data then the chart is blank. So what I'm trying to do is add a dcount to catch the 0 and give an error. So the 1st query makes the table where the data for the chart come from. The Qry-Test for Zero query, queries that new table if dcount is 0 it should error.
My problem is that I can't get this to work with the 0 if I make it 1 then I will get the message box if there are no records and if there is 1 record 2 and greater work fine. So my question is why won't the code catch the 0?
Dim stDocName As String
stDocName = "Qry-Makes Table"
DoCmd.OpenQuery stDocName, acNormal ', acEdit
If DCount(" * ", "Qry-Test for Zero") = 0 Then
MsgBox " There is no data for this time frame to chart. Please re-enter your Date range"
Exit Sub
Else
Thanks
jon
View 1 Replies
View Related
Nov 22, 2005
Need a little help here. I have this code on a command button that open a form that displays a chart. The chart work great as long as there is data to display. However, if there is no data then the chart is blank. So what I'm trying to do is add a dcount to catch the 0 and give an error. So the 1st query makes the table where the data for the chart come from. The Qry-Test for Zero query, queries that new table if dcount is 0 it should error.
My problem is that I can't get this to work with the 0 if I make it 1 then I will get the message box if there are no records and if there is 1 record 2 and greater work fine. So my question is why won't the code catch the 0?
Dim stDocName As String
stDocName = "Qry-Makes Table"
DoCmd.OpenQuery stDocName, acNormal ', acEdit
If DCount(" * ", "Qry-Test for Zero") = 0 Then
MsgBox " There is no data for this time frame to chart. Please re-enter your Date range"
Exit Sub
Else
Thanks
jon
View 1 Replies
View Related
May 19, 2006
I use the code below on a search form. I would like for the results of the list box search to populate a report instead of the list box. Is it possible to take the the sql and move it to a report? Thanks..
Dim strsql As String, strOrder As String, strWhere As String
Dim dbNm As Database
Dim qryDef As QueryDef
Set dbNm = CurrentDb()
strsql = "SELECT SiteIssues_tbl.IssueID, SiteIssues_tbl.SITE_ID, SiteIssues_tbl.IssueID, SiteIssues_tbl.AdminDate, SiteIssues_tbl.Occurring, SiteIssues_tbl.Issue, SiteIssues_tbl.Administrative, SiteIssues_tbl.Technical, SiteIssues_tbl.IssueComments, SiteIssues_tbl.CandidatesAffected, SiteIssues_tbl.RecordCreated, SiteIssues_tbl.User, SiteIssues_tbl.DateModified " & _
"FROM SiteIssues_tbl"
strWhere = "WHERE"
strOrder = "ORDER BY SiteIssues_tbl.AdminDate;"
'Set the WHERE clause for the QueryDef if information has been entered into a field on the form
If Not IsNull(Me.txtIssue) Then '<--If the textbox txtCenterName contains no data THEN do nothing
strWhere = strWhere & " (SiteIssues_tbl.Issue) Like '*" & Me.txtIssue & "*' AND" '<--otherwise, apply the LIKE statment to the QueryDef
End If
If Not IsNull(Me.txtAdminDate) Then
strWhere = strWhere & " (SiteIssues_tbl.AdminDate) Like '*" & Me.txtAdminDate & "*' AND"
End If
If Not IsNull(Me.txtSite) Then
strWhere = strWhere & " (SiteIssues_tbl.SITE_ID) Like '*" & Me.txtSite & "*' AND"
End If
'Pass the SQL to the RowSource of the listbox
Me.lstSearchResult.RowSource = strsql & " " & strWhere & "" & strOrder
With Me.lstSearchResult
If .ListCount > 0 Then
GetListCount = .ListCount - 1 'Headings count
Else
GetListCount = 0 'Headings don't count if no items listed!!
End If
Me.Text31 = .ListCount - 1
Dim ctl As Control
End With
If Me.Text31 = -1 Then
Me.Text31.Value = 0
Me.lstSearchResult.RowSource = ""
DoCmd.RepaintObject acForm, "SitesIssues_qry"
Me.Requery
MsgBox "No Records Found."
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acCheckBox Then
ctl.Value = Null
DoCmd.RepaintObject acForm, "SitesIssues_qry"
Me.lstSearchResult.RowSource = ""
Me.Requery
End If
Next ctl
End If
View 1 Replies
View Related
Jun 1, 2006
I have written the code below, which should work, however I am receiving an Error: Run Time Error '13' Type mistmatch on line:
Set cn = Application.CurrentProject.Connection.
Can anyone help?
Option Compare Database
Option Explicit
Private Sub cmdRun_Click()
Dim NICode As String
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Dim strSQL As String
Set cn = Application.CurrentProject.Connection
Set rs = New ADODB.Recordset
NICode = "txtLetter"
strSQL = "SELECT " & NICode & "1a, " & NICode & "1b, " & NICode & "1c, " & NICode & "1d & NICode & "1g & NICode & "1h FROM [WorkPlace NI Breakdown]"
rs.Open strSQL, cn
If Not (rs.EOF And rs.BOF) Then
MsgBox rs.Fields(NICode & "1a")
MsgBox rs.Fields(NICode & "1b")
MsgBox rs.Fields(NICode & "1c")
MsgBox rs.Fields(NICode & "1d")
MsgBox rs.Fields(NICode & "1g")
MsgBox rs.Fields(NICode & "1h")
End If
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
End Sub
View 3 Replies
View Related
Jan 3, 2007
Hi all,
I have code bellow which is bringing a tab called Heffalump from the excel spreadsheet into table. Now, what I need is to create a text box where I will be typing PI1228131313 and it's going to be changed in the code bellow.
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Test Import Specification", "K:FIDCPGCCGPI1228", True, "Heffalump!"
THANKS,
B
View 1 Replies
View Related