There are a couple of options. You can use a regular form and the textboxes and change all of their locked properties to true and the user won't be able to edit the data. You can also whange the form property Allow Edits to false.
If you just want to loop through the records you can create a...
If you use a query that only returns one row you can use the DLookup function like so.
Dim i As Integer
i = DLookup("FieldName", "QueryName")
if you want to filter out the row you want
Dim i As Integer
i = DLookup("FieldName", "QueryName", "Where clause without the Where")
Richard
I am not sure if I understand the scenario. You want to display all of the records, but you don't want the user to e able to edit the information?
If that is what you want to do you can lock the recordset or just use labels to display the data.
Richard
If I understand your problem, your switch statement is over 255 characters long. Have you thought of using a domain table?
Code Value
AMRL 1
ECON 2
etc
Richard
I just ran this on a table like you specified. The problem was that you need to specify only to reset the i to 1 when the customer field changes, not the combination of the two fields.
Let me know if this works!
Sub CountX()
Dim db As Database
Dim rs1 As DAO.Recordset
Dim ca As...
Yes, but I actually forgot a couple of lines int he code
rs("FieldName") = i
Should be
rs.Edit
rs("Count") = i
rs.Update
This will put the number i into the field Count
Actually, after re-reading it again I think we both got it wrong. The spaces are in the field. Oracle is allowing
[Column 1]
'Name'
'Name '
Access doesn't allow for the space. I think I might have to do with the collation scheme Access uses. I don't know if it is possible to change that...
RK,
Dim db As Database
Dim rs As Recordset
Dim cust As Integer
Dim item As Integer
Dim i As Integer
Set db = CurrentDb
Set rs = db.OpenRecordset("TableName", dbOpenDynaset)
cust = 0
item = 0
i = 1
While Not rs.EOF
If rs("Customer") <>...
Hey Robert,
You will need to import the table into Access, update the firlds with the TRIM() function and then apply the primary key and referential integrity.
Let me know if you need any help with this,
Richard
Hey Kyle,
The way I validate info is to create an input screen that is not attached to any data and I add a button on the screen to save the data. When the user pushes the button I then check the data.
What level of detail are you needing? How to put events onto buttons? How to look up data...
If you would like to take smaller steps to transitioning over to SQL Server and try some things out you could create a second Access db that holds all of the data and create linked tables. That would show you how the it would work as a separated FE/BE model.
My 2 cents,
Richard
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.