I am not even totally sure that is what you call it. . but I have most of my experience in VB.NET and this VBA in Access 2002 is killin me. HA. . .
I am trying to dynamically create checkboxes (50 of them) in 10 rows and 5 columns. This is part of a "im bored" project and would like to be able to tackle the dynamic controls area.
I am thinking I want to keep the naming convention as "chkBox01. . .02. . .03" so that I can use the mid() function to determine its "value" and apply the value in the proper place.
I suppose the only thing I need is an example if anyone has one of a checkbox or any control for that matter being made by VBA and not placed on the form manually. 50 check boxes suck when trying to rename them all. sigh
's1 If Me.txtFieldS1 = 5 Then Me.txtS1 = soc5 If Me.txtFieldS1 = 4 Then Me.txtS1 = soc4 If Me.txtFieldS1 = 3 Then Me.txtS1 = soc3 If Me.txtFieldS1 = 2 Then Me.txtS1 = soc2 If Me.txtFieldS1 = 1 Then Me.txtS1 = soc1 If Me.txtFieldS1 = 0 Then Me.txtS1 = soc0
What's the best way of storing arrays of data within a cell? Or should I be creating fields to the size of the array.The size of the arrays are unknown at the moment.
I have a form that allows me to sell animals in a group. While some fields, (i.e. buyersname, sellingunits, datesold) are good for all, some fields (i.e. AnimalID, SellingWgt, Sellingprice, Picture) need to be specific.
Having said this, Using a query for GroupSales, I filled a list box of all the animals that are to be sold. Below the list box two command buttons (1-ALL) and (2-by Group).The only difference being here, is that by clicking cmdALL all animalIDs listed in the list Box will be highlighted. The By-Group means the user has to highlight the IDs they want to sell..
In either event, there will multiple IDs. If I can use arrays here, I could include the other fields for each animal that has been chosen. These would then be updated/appended to other tbls.
Are there no arrays in Access? I am looking for a way to put sequential dates onto a calendar. An array would work fine, with an offset for Weekday(FirstDayOfMonth).
I am attempting to make a macro to pull information based on a clicked button to provide information to another form. While my example below will be rudimentary, I am attempting to create so that it can be applied to 450 buttons, hence the need for it to be a macro and not simply code per button.
For example if I have 3 buttons, captioned: red, green and blue. If I click on the blue button, it will open another form with a text-box that will say 'blue'. Likewise, if I click the red button the text-box will be changed to 'red'.
In the code below the section that I need to change is: Command1.Caption. Using this data I can pull from the one button to create the value, but I need it to be based on an OnClick or something in order to pull the value from the right button.
Question 2: I am trying to use a query to change button colour on the basis of values stored in a table.What I want to do is change the button background after comparing the button name to the same variable in a table, and determining another variable.
IE: Button1, Button2. In table: Button1, Val = Y, and Button 2, Val = Z
Pseudo Code: Array: From Button1 to Button2 Query for Button1 against table If Val = Y, Button1.background = red Else if Val = Z, Button1.background = blue Else Button1.background = black End if
I added a new field to one of my tables and query, but when I try to add a control for that field into my form it is not recognising it and the field isn't appearing in the sources for the form, even though the table is sourced to the form? Or am I going to have to do the usual and redo the entire form because I made a minor adjustment?
I have a form with a tab control, inside the tab control I placed an ActiveX control (Microsoft Web Browser). These are at the bottom of the form.
Everything displays fine if the entire form fit on the screen but if the form is too long and I scroll down the browser control is getting obscured by the tab control and getting chopped off (the contents are covered). It is as if the browser control is staying in space where it was and moving behind the tab control as I scroll.
This problem does not occur if I place the browser control directly on the form. Also I note that the browser control is sitting correctly within the tab control.
I have been through all the settings and properties of both controls and haven't been able to fix it. I searched all over the web but no one has previously stumbled across this one by the look of it.
I have table that I had to add a new field to which we update with a form. I tried to add a control for the new field but the field does not show up in the list for the control source. I am trying to add a list box to the form with a blank and 5 options.
I have attached screen shots of the table design and the form. The table has the field in datasheet view and I have manually entered a few entries in it but it still will not show in the control source for the form control. The top section of the form is where we enter and select the data for the new records. The bottom section (circled in red) autofills the matching record, from separate tables, for updating with the new entries.
I have added form controls for modified fields in the past so I am confused about why this is happening.
OK. I have searched and searched and every thread dances around similar situations but none seem to address this particular one. I am trying to make a control on a sub form visible/not visible depending on the condition of a control on a main form. The catch is that the control I'm trying to change the state of is on a subform located in a tab control. I've tried a thousand combinations and none seem to work. How do I reference the control on the subform in a tab control?
Main Form: frmMemberMain Tab Control: TabCtl12 Tab Control Page: 2 Subform: frmChildren Control on subform: txtRelationship
Can someone please help before my brain explodes!! Thanks! :eek:
I have reviewed the posts for 'Control Validation' and dowloaded the sample database kindly posted by ansentry.
In the PaymentAmount example, a name has to be entered in the first control before an amount is enterered in the second control. If the controls and tab order are reversed, the validation doesn't work.
I have a form where the 1st Control needs validating before moving on. The code below doesn't work.
Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Me.Employee_No) Then MsgBox "Employee No Required", vbCritical, "Data required " Cancel = True Me.Employee_No.SetFocus Exit Sub End If
I have used a tab control to create some forms. However, I can't modify or delete any of the information. It's seems like the forms are just read-only.
How can I change it so that I can modify and delete info please?
I am creating a DB using tab controls, I have my information in each tab section. When I come to view in Form View and move my mouse around the tab page it shudders for some reason? anyone know why and how i can fix it?? Thanks:confused:
I would like to be able to add a tabbed control to one of the pages of a tab control. I have made several attempts and it hasn't worked. There is no reference to it in MS help. I have seen many databases with this facility (not necessarily MS Access). Can anybody offer a suggestion please.
I usually use wizard for creating forms only now I need to have tabs for quite a few forms.
I've recently discovered that you cant simply put your labels and field on a page then select another tab and put other labels and fields on. I've tried looking frmSampl provided by microsoft put cannot figure out hows the single form with tab control on it works.
Can anyone direct me to online help with forms or provide any help with the tab control tool?
I want a Command Button on a form to move to the next Command Button. I basically want to do the same thing as the Tab button on my keyboard. However, I do not want to use the keyboard.
We have just been upgraded to '03 and while poking around noticed that the tab control changed a little. The main diff was the active tab is slightly easier to pick up because of the highlight line (See attachment). Does anyone know of any other changes in the newer version in the tab control or any other control?
This seems like it would be easy enough, but I can't seem to find an answer. I'd like to put a tab control on one page of a main tab control. I've tried to select the page and create a new tab control and cut and paste existing tab control, but in both cases the tab control pastes into the detail section of the form (where my main tab control is) and thus appears on all pages. Anyone know what I need to do? Thanks for any help.
I have added tab controls to my already created form. My original page sits there alone, not on a tab control. How do I put it on a tab control without having to re do everything??? I tried to put it on a tab/page and it lost all the lable names and changed it to numbers.
A simple question. I have tried to add Tab Control(s) in another tab control but those added tab control added in one particular tab control are shows on all tab controls in the same forms. Is it MS Acess limitation or I just don't get it done correctly?
i have a simple freeware ftp control i use on my machine at work. i need to distribute an app with ftp capabilities, though, and don't want to go to 50+ machines and put this .ocx on them all. my IT department may frown on that also. so....was wondering if anyone knew if there is any ftp support with microsoft .dll's or .ocx's. basically i need something i could reasonably expect any user to have readily available on their machines already.
If this issue had been addressed before, please direct me to the thread; otherwise please help.
I've created several TABS on a form. Each tab contains several drop down lists. I've also put a field above the tabs for displaying the choices that I make on the various tabs, BUT I can't get the choices to display in the field above the tabs.
Just wanted a little help please. I have about 100 option boxes on a form and I want to be able to change the names of the option box and its label. I want to name them from 1 to 100 sequentially. (i.e. option1, option2 ...).
When I create the controls it automatically names them option0, option2 etc. and label3, label5 etc.
I was going to change them via some code but I don’t know how to refer to a control in a form from design view.