I am trying to create a form that has a tabular main form and a tabular subform. All I can do is to create a main form that just shows a singular record (columnar). I want to be able to see say 10 records in the main form and 10 records in the subform. How do I do this?
I'm trying to make a field specific image on a tabular subform, so a different image appears on every row depending on the field information.
Currently my code displays the same image on every row depending on which subform row is selected:
Code: Private Sub Form_Current() Dim imagepath As String imagepath = GetImagePath & Me.Exercise & ".jpg" If Len([Exercise]) > 0 And Len(Dir(imagepath)) > 0 Then Image26.Picture = imagepath
Is it possible to have an unbound image control on a tabular form displaying a different image for each record ?
Actually i have tried putting some code on the onCurrent event, but it is displaying the same image in all records, depending on which record is current.
This is the code which i tried using:
Private Sub Form_Current() On Error GoTo Err_Form_Current If Not IsNull(Me.txtCountry) And Not IsNull(Me.txtCatalogueNumber) Then Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStamps" & Me.txtCountry & Me.txtCatalogueNumber & ".jpg" ElseIf IsNull(Me.txtCountry) Or IsNull(Me.txtCatalogueNumber) Then Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStampsNotAvailable. jpg" End If Exit_Err_Form_Current: Exit Sub Err_Form_Current: If Err.Number = 2220 Then Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStampsNotAvailable. jpg" Else MsgBox Err.Description, vbExclamation, "Error #" & Err.Number End If End Sub
Actually, the above code works fine for Single Form, but not on tabular form.
I'm using 4 combo-boxes in order to filter a tabular form in access.
One combo box is for a company name the second is for a report type and the third and forth is for choosing years. I used VBA in order to apply the filter:
Each line works by itself but I cant figure out how to combine them together, or how to use "AND" between each filter so the filtering will refer all of them when I run the code.
I'm new here, mostly learning to do stuff by trial and error. I have a sneaking suspicion that I could easily search out the answer to my question if I had the right vocabulary, but I don't think I do...
Anyway, my question, hopefully you can help me with.
I've got a tabular form that has a couple of comboboxes, and then a text label:
ComboA....ComboB....Label
What I'd like to do is change the label for each row based on the Combobox data...
That's what I want. How I'm currently doing this is having a Sub called whenever the Combo boxes are changed, to change Me.Label.Value to 3, in this example. Of course, what instead happens is I get...
Which is not what I want at all. Is there a way to change the value of the label in(for instance) the second row, without changing /all/ the labels in the continous form? I'd be really handy to know how to do that, but I just can't puzzle out a way.
If that's not possible... Any other way to get my labels to display the information? Part of the problem is that my function relies on information stored in variables in my form, and I'm not sure I can access those just from the source propery of the label... What I need, essentially, is to put in Label's value the result of MyFunc(ComboA.Value,ComboB.Value,formvariable1,for mvariable2).
I have a tabular form which i use to input new payments for tenants.
What i'd like to be able to do, is have another form, with a combo box that i can chose my tenant from, then for a tabular form to show only the payments made for that tenant, sorted in date order.
So I'm trying to set up a Tabular form as sort of a checklist
Example Step 1, Step 2, step3, etc etc etc
I have the form setup with 4 tabs or 4 seperate forms within 1 form (works nice) now I trying to set up my query to open the form and I have 3 tables linked to the form. see bitmap
When I add the 3rd table to the query my forms opens to a blank screen no pages and no fields ....
I know there have been a good number of questions about visibility in forms already but I couldn't find a solution to my problem (or maybe I just didn't get it).
Basically, I have a tabular form (more than one record displayed at once) and one the field is of the Yes/No type. For each record, I'd like to have a text box that displays 'pending', set as visible if the field value is 'Yes' and set as invisible if the field value is 'No'. The table is as follows: id : auto-number Flag: Yes/No [Yes]
If I use the following code on the Flag button: Private Sub Flag_AfterUpdate() Me.pending2.Visible = Me.Flag.Value End Sub
all the 'pending' text boxes appear and disappear together (instead of just the relevant one). I thought of using another text box, with the same data source ('Flag') but which would set itself to visible or invisible wrt to its own value but I couldn't find a way to do it.
Any suggestions ? Thanks in advance ! and many thanks already for the forum and the contributions - it's been extremely helpful, esp. for a beginner.
I'm trying to create a form like the Employee form in Northwind Database, but I'm clueless, I'm getting the different tabs, but when I move from the first page to the second page the fields on the first page is showing on the second and third pages.
Any help is appreciated.
Many thanks.
PS: I created a form & then draw a tab page(from toolbox menu) on the same form & try to move the fields onto the tab pages.
I have created a tabular style DAP using the page wizard before. I used to have the option, but now I only seem to have columnar style. Is there an option I have to select somewhere?
I'm curious if anyone know's a way to access a specific data section on a tabular form. I'm attempting to have each section update a specific data item based on its position on the form, but am having problems since I do not know how to differentiate between one details section and another on the form. Any help would be appreciated.
So you make this nice continuous form (or report) using the tabular layout, layout/format the whole enchilada... and then at some stage you need to add one more field to the display.
You could change the layout to stacked, drag the field from the Add Existing Fields list onto the layout and then change the layout back to tabular.
Is there any other smart way to add a field to a tabular layout in A2007, so that the label winds up in the header section and the textbox (or other control) in the detail section?
i have a form the control source of form is getting information from table and the type of form is tabular i want when the user input for example 10 person into form when click in the button all the record stored from another table , how to do it ?
Hello all - Working on a form that is supposed to display order approval information. In the database I'm working with, people are stored as in the approvals table by a reference to an autonumbered value. However, I want to display their name, which can be obtained normally through an SQL or DLookUp Command. This tabular form style though is giving me a problem. If I put new textboxes on the form and load it as I normally would, like:
*ApprovalID is a hidden textbox that stores the number that is used to represent a particular user.
The problem becomes that using an OnLoad or and OnCurrent Form function, the boxes only load one value. I want them to load the different values for the different entries, but I am lost as to how to do this. Any help would be appreciated.
A similar issue that I've been having with reports is that I don't know how I would do this at all... I want to do the same thing (retrieve the Name or whatever that is related to a numerical value) and put it on the report. I'd appreciate any info on how to do this.
Kinda stuck at deciding what I should do here.. What would be the best way to prevent a user from entering data into a tabular form without making sure a certain member exists first?
for example if I have a columnar form
BOXA BOXB (invisible or disabled by default)
1 of 2
I can have it check to see if BOXA has data if it DOES i can make BOXB available for data entry
but lets say I have a tabular form....
BOXA BOXB BOXA BOXB
1 of 2
How can I make it so that BOXB will not accept data entry UNLESS its corresponding BOXA has data in it already?...
A:[asldkfjaskd] B:[AVAILABLE FOR EDIT] A:[] B:[NOT AVAILABLE UNTIL MEMBER IS CREATED]
It needs to be in tabular form too.. sigh.. anyway.. thanks for any help you might be able to provide
I have a subform which makes a change to a field on the main form. When focus is returned to the main form, the BeforeUpdate and AfterUpdate events fire. Why? I thought from the form's perspective, the subform is just another control.
BTW, I get the same behavior if I modify the field from within the Exit event of the subform control.
In either case, the main form's Dirty event is NOT triggered.
I have a main form that has two subforms, subform1 and subform2, both connected to the main form. When I enter data into a field in subform1 I want subform2 to requery and update to show the calculated results from the new or changed data in subform1.
I found that if I do a refresh it works when changing the data but not when entering a new line of data in subform1. I tried some code in the after update field of on subform1, but cannot seem to get anything to work.
Me.[subform2].Form.Requery
Does not work. It errors and says it cannot recognize subform2 as a field. I have tried a field name on subform2 but I still got the same error.
Lets say I have Form A and Subform A with the parent-child relationship established that works well. Subform A has a Text box control that is getting display when I include the subform in Form A.
Now, I decided I dont want to include subform A in the Form A. Is there a way for me to show the contents of that Text box control in Form A without attaching the subform in the main form (Form A)?
I read somewhere that to refer a control on a subform, I have to use the code - Forms!mainform!subform.form!control. But this would be in VBA. What is the equivalent of this in a Control Source in the main form?
If I have not explained myself correctly, please do let me know.
To summarize, my question is without including the subform, I want to reference the values of the subform in the mainform. (I have some design necessity for this requirement) Is there a way for this?
I've a form that has 2 subforms - which subform is used is dependant on the selection of a combo box in the main form. After much time spend trying to set this up I am happy to report that this section works fine.
My problem is that when I have completed the subform I am not able to continue tabbing through the rest of the form.
everytime i try to tab from my subform, it creates a new record for that subform. Also, about the subform, the control that links the main form and sub form is unique. I have now set my Cycle property on my subforms and forms to Current Record. How can I tab from the subform to the main form and vice versa?
Hi, I have this main form, "frmMainPatient" and I am trying to add in another Main form "frmFim2" as a subform into frmMainPatient. I am running into some issues. Can someone take a look and tell me what I am doing wrong. Thank you,
I have a main form that contains basic project information, and one of many subforms that contains project manager and contract information. (forms and subs linked by project ID) My project managers want to have the ability to only show project records that are theirs. I can make a filter based on any field in the main form without a problem using code like below.
Dim strFilter As String strFilter = "ILFID Like '*FME*'" Me.Filter = strFilter Me.FilterOn = True
How do I write a filter to reference the project manager field in a subform that will actually filter the main form and subform records?