Microsoft Access Forum

Posted by Anonymous March 24, 2009 - 3:08am

In your tutorial for Defining Tables and Field Sizes point 6 reads:
"6. Field Size It refers to the maximum length of data that can be stored inside this field. E.g., if you specify a number field size as 3, then it can store values maximum of 3 digits values or up to 999. Field sizes can be set for both text and numeric fields.)

Is this correct when dealing with a field data type of "Number". I cannot put 3 in the field size attribute.

What is the proper way of limiting a number data type field to 3 digits ie from 1 to 999? Eg Employee Payroll numbers from 1 to 999.

Posted by Anonymous May 21, 2008 - 7:24am

Kindly advice me how to attach access file in this forum to enable me to ask questions

Posted by Anonymous February 18, 2008 - 3:08am

Public Function getTradeMarks(varProdName As Variant) As String
Dim rs As DAO.Recordset
Dim intRecords As Integer
Dim strTradeMarks As String
Dim strSql As String

'strSql = "Select distinct [trademark] from tblTrademarks where [productName] = " & varProdName
strSql = "Select distinct [trademark] from tblTrademarks where [productName] = '" & varProdName & "'"
Set rs = CurrentDb.OpenRecordset(strSql, dbOpenDynaset)

Do While Not rs.EOF
intRecords = intRecords + 1
If rs.AbsolutePosition = 0 Then
strTradeMarks = rs.Fields("trademark")
Else
strTradeMarks = strTradeMarks & ", " & rs.Fields("trademark")

Syndicate content