In this situation - assuming you are using a form to list the people then opening a second form I usually do the following.
Dim myDb As Database, MyRst As Recordset, Recs As Integer, SQLString As String
Dim stDocName As String, stLinkCriteria As String
Set myDb = CurrentDb
SQLString =...
I used to put pictures on buttons by entering the path in the picture field. If the icon is located on a server then this format works
\\Server\Folder\NextFolder\Icons\Computer\Drive01.ico
But creating the icons was always a lot of work. Now I use the standard ones and the ControlTip Text...
Richard,
to be honest I didn't look at your code, this was a slight modification of something I used for a system a little while ago. I remember it took a little while to find out when the last record was reached as there seems to be no built in way of knowing - unless someone else knows any...
You send a string delimited by a combination of characters which you never use - say |~ then use the Mid/Instr functions to extract the fields on opening the receiving form.
This is my solution to your problem.
Code for buttons is:
Private Sub first_Click()
On Error GoTo Err_first_Click
DoCmd.GoToRecord , , acFirst
If Me.CurrentRecord = 1 Then
Me.next.SetFocus
Me.first.Enabled = False
Me.prev.Enabled = False
Me.next.Enabled...
I have found using single quotes within the SQL strings easier than using the Chr(34) method Especially for multiple selection criteria. For instance:
MySql = "SELECT tblTimeSheets.StartingDate "
MySql = MySql & "FROM tblUser INNER JOIN tblTimeSheets ON "...
If this is in a Query then you could use an Iif function, assuming you require negative hours and minutes then this might work
WorkingHours: IIf([ValueInMinutes]<0,"-" & Int(([ValueInMinutes]*(-1))/60) & " : " & (([ValueInMinutes]*(-1)) Mod 60),Int([ValueInMinutes]/60) &...
I don't know if this will help but I use the following for filtering in a form (Access 97). Using a button the on click code is:
On Error GoTo Err_FiltBySelect_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 0, 1, acMenuVer70
Exit_FiltBySelect_Click...
The following code modified to your file details will tell you how Access is handling the data. If it is being read as a single line then you can modify the code in the loop to read the data upto which ever charecter is being used to delimit the lines and then write the results into a table. I...
You could do it with a fairly simple piece of code. Create a new table, in this example it has two fields
LongEmail which is Memo format
Created which is Date format
the Table is named LEMail
Create this code
Function CreateLongEMail()
On Error GoTo Err_CreateLongEMail
Dim MyDb As...
I have a very complicated piece of code for data from a text file which is comma seperated but because it contains upto 30 different record types with different numbers and types of data won't import directly into Access. If the standard import methods fail I'll post up the general method. The...
I thought of a much more elegant solution on my way home last night. Code below which is run from the starting form. NO on open action required in the destination form.
Private Sub Details_Click()
On Error GoTo Err_Details_Click
Dim MyDb As Database, MyRst As Recordset, Recs As Integer...
You don't need the lines
Dim stLinkCriteria As String
stLinkCriteria = "[Payroll_Number]=" & "'" & Me![Payroll_Number] & "'"
in the first piece of code these were accidently left in from my original code - sorry.
This is a two stage process, assuming you open the second form each time the button is clicked on the first. In this case the button on the first form is named "Details" and opens the second. This example makes use of the "OpenArgs" system variable.
The "onClick"...
I have had the same problem in the past. My solution was the code below which is not elegant but seems to work. You will also need a table of Bank Holidays (Public Holidays). The code is which can be used in a field in a query as per:
DAYS IN QUEUE: WorkingDays([indate],Now())
Function...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.