Enable fields VBA
If Status = "Active" Then
Trial.Enabled = True
Since there are several fields, is there a way to group those fields and name the GROUP of fields, so I don't have to do each one individually? I'm thinking something like this:
If Status = "Active" Then
Group1.Enabled = True
Thank you for taking the time to report an issue.
What's wrong... Please write below.
cboActivity - this combo box lists the Activity Numbers (i.e 1.1, 1.2, 1.3, 2.1, 2.2, 3.1)
txtStartDate - this date field is an Input field
txtEndDate - this date field is an Input field
txtQuantity - this text field is an Input field
txtStartDepth - this text field is an Input field
txtEndDepth - this text field is an Input field
Goal / Solution Required: I would like the subform to lock the last three text fields (txtQuantity, txtStartDepth, txtEndDepth) on load.
I would like to enable these 3 fields for input based on the "cboActivity" value. The following condition to enable the text fields are:
I know that I can manually enable macros through the trust center and I could also add a trusted location (could prob. also automate a registry update to do same). My preference though isto enable macros using a script as over 600 users will, on occasion, use these databases and I don't want to spend my days telling people how to enable macros.
Can I modify the property of the relationship from VBA to enable Cascade Delete on this one relationship, carry out the delete operation and then disable the Cascade Delete again?
Each time the table is recreated, 2 of the fields that are in the query, have their names and data changed. My problem is that when that happens, the query works fine since its SQL is being changed in VBA to reflect the new changes, but the report shows an error in the fields that have beenchanged in the table.
Is there any way for me to dynamically change the report's fields, to the once used in the query.
Table Name: tblAwardsLog
4 fields: LastName , FirstName , Recommended , DateInitiated
All fields are TEXT fields. even DateInitiated
I have this Awards Log almost to where I want it, but just can't seem to get this one thing to work right.
Can I code a do loop that can reference each of the Dataxx fields. for example.
For I = 1 to 8
myField = Data & cstr(I)
I know this wouldn't work, but is there a way to calculate and use a field name?
all fields on the form are unbound fields, does the form and vba consider them all strings or not?
If I rearrange the fields manually and close/save the query then open it again, they show up correctly. However once the VBA code is run, the query once again is generated with the fields being in the wrong order.
I tried creating a datasheet form based on the query, and the fields were in the right order right away. the problem is I can not use a form for this, because the fields used are dynamic.
As of right now I have a main form with 2 buttons, one for the search and one for the add. The form for the add is finished except for the VBA in the back end. The fields in the add form correspond to the fields in the table but I can't figure out how to go about getting new records into the table.
Is it an SQL INSERT statement? Or is there a built in function in VBA thatwill allow me to do this?
Please anyone. I will attache the file for your view and code suggestions.
Please check the first form that opens on start up