I would like to make tables for user input as to what tables are required and what fields need to be in the table.
For example:
Have a table that has the following fields
TableNameID
FieldName
DataType
Description
Then have a form that the user types this information in, and a command button...
This is possibly a very simple thing I am trying to do, but for the life of me I can't seem to get it right. I am trying to set the name of a control in vba and then set it's value to a stored value.
Method 1 (Which Works)
eg.
Dim MyCtl as Control
Dim MyFrm as Form
Set MyFrm = "frmABC"
Set...
Thanks guys, I think I got it. Code now looks like this:
Forms!Orders.RecordsetClone.MoveLast
MsgBox "My form contains " _
& Forms!Orders.RecordsetClone.RecordCount _
& " records.", vbInformation, "Record Count"
Just replace the red text with whatever form name you are using.
I did that but still get the same error, Is it normal that the error will point to the do loop, even though there might be an end if missing? If so, is this a bug or is it intentionally done so?
Open my form with all records, then after pressing a button I want to calculate programmatically how many records there are so that I can use that number in a do loop statement
Using the code:
Dim Check, Counter
Check = True: Counter = 0 ' Initialize variables.
Do ' Outer loop.
Do While Counter < 20 ' Inner loop.
Counter = Counter + 1 ' Increment Counter.
If Counter = 10 Then ' If condition is True.
Check = False ' Set...
In Excell, using roundup produces the following results:
ROUNDUP(45.2,-1)=50
ROUNDUP(45.2,0)=46
My 1st question is: Is there a function in access that will produce the same result?
Secondly, if not, how to go about writing the code?
Thanks for now
I'm not sure this will help, but you should check the following.
Even though the query results appear to be fine (Visually speaking ) you're probably using a combo box to select the skill in a form (or query), then hiding the value of the index so that the user sees the skill; however access...
Hi Missy Ed
Thanks for the help but it still does not move the focus to the desired field. Maybe I should try redesigning my form so that it doesn't need all the subforms.
Umbane
I have a form with a subform, and the subform has a subform also. On the main form, in the form header section I have an unbound combo box from which the user must select a client. On the after update event of the combo box I want the focus to go to a record on the second subform so that data...
I have some forms which do the same and I use this code, see if it helps.
Private Sub City_NotInList(NewData As String, response As Integer)
Dim db As Database, rs As Recordset
Dim strMsg As String
strMsg = "'" & NewData & "' is not an available City Name"
strMsg...
I got this little piece of code courtesy of The Access Web Forms Index, hope it helps you.
Private Sub Form_BeforeInsert(Cancel As Integer)
Me!UpdatedByUser = Environ("username") ' this is the NT loginID
Me!UpdatedByUser = CurrentUser() ' use this line if you want...
Has anyone ever used the MSComm32 control in Access, if so what is the correct way of getting the data coming in on the serial port to be displayed in a text box.
I have used the control from VB 6.0 and it works great but Access doesn't seem to support the MSComm1.Input method.
I have posted on...
Has anyone ever used the MSComm32 control in Access, if so what is the correct way of getting the data coming in on the serial port to be displayed in a text box.
I have used the control from VB 6.0 and it works great but Access doesn't seem to support the MSComm1.Input method.
I have posted on...
Has anyone ever used the MSComm32 control in Access, if so what is the correct way of getting the data coming in on the serial port to be displayed in a text box.
I have used the control from VB 6.0 and it works great but Access doesn't seem to support the MSComm1.Input method.
I have posted on...
Hi Paul
Recently I had to make a report based on information that was missing from my database and I got the following code that may help you. Some modification will be necessary for it to work in your particular app though. Place the code in the on format event of the report.
Dim lblMissing...
The question is do you need those records where that date is null or not, if not then in the criteria column type in "is not null", otherwise if you are using the crosstab from a report the on format event in the details section of the report will help. Use the code
If...
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.