Hi,
You could try a function such as :
Function Contact_ID ()
Dim idfield As Variant
idfield = DMax("[ID]", "TableName", "[ID] Like '11*'")
If IsNull(idfield) = True Then
Contact_ID = 110001
Else
Contact_ID = idfield + 1
End If
End Function
Hope this helps !
Hi,
If you're using a form to enter the contacts you could try using an AfterUpdate event the Customer field, such as :
Private Sub Customer_AfterUpdate()
Dim idfield As Variant
idfield = DMax("[Contact_ID]", "TableName", "[Customer] = '" & [Customer] & "'")
If IsNull(idfield) = True Then...
Hi,
You can use ADO :
Set rs = New ADODB.Recordset
rs.Open "Table_Name", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
MsgBox (rs.RecordCount)
rs.close
Make sure you've referenced the ADO Library
Hi,
Try using the Dir function to check if the txt file exists instead of waiting for the error
Check_FilePath = Dir(file_path)
Check_FilePath = True if it exists
Otherwise you can check for the error number in your error handler as follows
if err.number = 3031
'Resume
else...
Hi,
You need to link the two tables in the sql statement.
Try building it as a query and copying the sql, it'll look something like this :
SELECT t_orders.order_status, t_orders.Contact_name
FROM t_customer INNER JOIN t_orders ON t_customer.customer_ID = t_orders.Customer_ID
WHERE...
Sean,
I had the same problem.
Its messy but I declared a Private Boolean within the module of the form and set it to false when the forms opened.
Then on the AterUpdate event of each of the controls on the form I added code to change the Boolean to true.
I then used the OnCurrent event of...
This is the complete code that I used, try copying it directly into your event procedure.
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.ScaleMode = 1
Me.DrawWidth = 3
Me.Line (0, 0)-(15518, 0)
Me.Line (0, 0)-(0, 14400)
Me.Line (629, 0)-(629, 14400)
Me.Line (3975...
Hello,
Try typing these lines before the code :
Me.ScaleMode = 1
Me.DrawWidth = 3
Sorry, I forgot that you had to define the measurements that the lines are measured in.
MakeItSo???
It should work if you haven't installed Microsoft Jet 4.0 Service Pack 4 (Msjet40.dll version 4.00.2927.4) or later.
Have a look at this link which shows a work around if you have a later service pack.
http://support.microsoft.com/default.aspx?scid=kb;en-us;287756&Product=acc...
Hello,
When you build a query and add a criteria e.g. [Please enter the id], you can define it as a parameter so that Access knows what type of data type it should be.
In the Menu Bar of the query builder goto Query, Parameters... and type in the parameter that you want to define and choose...
Hello,
1. Try setting up a batch file, which copies the secured front-end from a network drive onto the users PC, e.g.
xcopy {location and name of front-end} c:\ /e
copy this into notepad and change the file extension to .bat, double click on the file to run it.
2. I'm afraid so, you could...
Its abit nasty but effective (like herpies cream!)
Function Hello(Chris100 As String) As String
Hello = Mid(Chris100, InStr(1, Chris100, "(C", vbTextCompare) + 1, InStr(1, Chris100, ")", vbTextCompare) - InStr(1, Chris100, "(C", vbTextCompare) - 1)
End Function
You have to reference the...
Hi,
Does it always start with C and is there ever a C elsewhere in the description
Also, is the (C0102292) always the same length and at the end of the description ?
PS, nice name !!!
Looks OK !
try using DAO (Should be quicker than 2 DLookups anyway!)
dim db as dao.database
dim rst as dao.recordset
set db = CurrentDb()
set rst = db.openrecordset ("SELECT * FROM tblZips WHERE ThreeDigZip = '" & Me.ThreeDigZip & "'", dbOpenDynaset)
rst.movefirst
me.city =...
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.