Tabular Form With Unbound Control
Nov 23, 2006
Hi,
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.
Thank you for any advice.
View Replies
ADVERTISEMENT
Aug 25, 2006
Hi
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?
Thanks
View 1 Replies
View Related
May 9, 2013
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?
View 2 Replies
View Related
Apr 2, 2013
I have a report that starts with an unbound form [Form1] which I need for the parameter inputs. Date1, Date2 and BillingMonth, all three are unbound controls. Date1 and Date2 are the criteria for the dates of billing and they work fine, that is, the query looks them up and the query runs fine. But I want to use the unbound control of BillingMonth to populate an unbound control in the report heading.
The control source is set as =[Forms]![Form1].[BillingMonth]; it works fine if the underlying [Form1] is still open. There is a command button on [Form1] that opens the report and then closes [Form1] since it is a pop-up form that is only used to get the criteria for the underling query; I don't want it to remain open when I run the report. However, the [BillingMonth] does not appear on the report heading. Just #Name?, which I assume means that since [Form1] is no longer open, it can't find the control [BillingMonth].
So, how can I get the [BillingMonth] to appear on the report heading?
View 3 Replies
View Related
Jul 19, 2015
In my DB i would like to make a form that displays different calculated values based on other forms and queries like income running cost etc., but i do not know how to refer in an unbound control to value of a control in another form. I get always #names? error. However it worked when loaded that form i refered to. Is there a way to do it without loading the refered form?
View 3 Replies
View Related
Apr 12, 2015
I have an unbound control in data input form requiring to input a 6-digit number. I have put a validation rule restricting more than 6 digits. Most users prefer to enter, say 123 and the system can enter the 3 leading zero for them.
View 6 Replies
View Related
Sep 18, 2005
I have a tabular form for a sales database. i.e:
Product Qty Cost
Cherry Coke.........1...............0.95
Diet Coke............1...............0.95
Sprite.................1...............0.55
Cherry Coke.........1...............0.95
I want a command button to open a new form and show total product quantity and total cost, but on a normal form. i.e:
Product Qty Cost
Cherry Coke........2...............1.90
Diet Coke...........1................0.95
Sprite................1................0.55
..........................Total:........3.44
How can this be done?
Thanks
D
View 1 Replies
View Related
Aug 6, 2014
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:
Code:
Me.Filter = "[Company].Value Like ""*"" & '" & Combo108.Value & "' & ""*"""
Me.Filter = "[Report_Type] =" & "'" & Me.Combo123.Value & "'" & ""
Me.Filter = "[Rep_Year] Between " & Combo125.Value & " and " & Combo127.Value
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.
View 7 Replies
View Related
Jul 28, 2006
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...
ComboA....ComboB....Label
Red..........Apple.......0
Red..........Apple.......0
Red..........Apple.......0
The user changes some setting, so this happens...
ComboA....ComboB....Label
Red..........Apple.......0
Blue..........Pear........3
Red..........Apple.......0
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...
ComboA....ComboB....Label
Red..........Apple.......3
Blue..........Pear........3
Red..........Apple.......3
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).
Any help would be muchly appreciated!
View 2 Replies
View Related
Jul 5, 2013
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.
View 1 Replies
View Related
Jun 28, 2013
Is it possible to move down records with the down button in a tabular form to the same field in the next record.
View 11 Replies
View Related
Dec 31, 2013
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 ....
View 7 Replies
View Related
Nov 23, 2007
I have an inventory transaction file that has quantity on hand as a calculated field. I am trying to add this unbound field to a report using a query but I can't figure out how to add my quantity on hand field to the query since it is a calculated field and not a bound control.
Any help would be appreciated.
Thanks
darrrellx
View 1 Replies
View Related
May 3, 2006
Hi there,
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.
View 2 Replies
View Related
May 12, 2013
I have made an unbound check box, named "myckeck" in a form which shows data from a table in tabular layout.
1- When I check one check box, all check boxes are checked. How can I solve that? I mean I want to check or clear check boxes independently.
2- I made a text box, named "jobdate" to sow todays date automatically upon checking a check box.
Code:
Private sub mycheck_afterupdate()
jobdate = date
End
But this is not working and checking a check box does not make anything to happen.
3- Then I made this expression in the default value of "jobdate" properties:
iif( mycheck = true, date(), null)
This not working either.
View 3 Replies
View Related
Oct 25, 2005
I have a form that uses a query as its control source. The problem I have is that on this form I have an unbound textbox that I need to show the result of another query in. I thought I could do this by using =[Query]![QueryName]![Field name] in its control source, but this isn't working.
What is the right way to go about this?
Cheers
View 5 Replies
View Related
Jul 7, 2015
I have run across a problem where I have an unbound control on a report that "used to work just fine" until today. It is a concatenated string:
Code:
=[ProgramCity] & "," & (" "+[Programstate]) & (" " & Left([ProgramZip4],5)) & (" "+[ProgramCpsAbbreviations])
I have this on two slightly different reports, where only one line of the report is different. One report works fine, no problems. All the data is there. But on the second report I get the dreaded #Name? error.
So I amended my query and used
Code:
CSZ:[ProgramCity] & "," & (" "+[Programstate]) & (" " & Left([ProgramZip4],5)) & (" "+[ProgramCpsAbbreviations])
And now set the field source as CSZ and it now works fine.
So my question is: Why does the concatenated code not work sometimes in a report but the same code in a query works fine?
Do reports not like concatenated fields?
View 11 Replies
View Related
Feb 21, 2006
Hello,
Please see the attached images (screen shots from my db).
I'll start by explaining the function of this form. Invoices are raised through a different area of the system - they then appear in the outstanding invoice list in my payment processing screen while awaiting payment. When a payment is received the user creates a payment using the controls at the top of the form. When created - payments will appear in a list box at the bottom of the screen. I then want the user to be able to highlight a payment from the list and type the amount to allocate against each line in the outstanding invoices subform. Then (once happy with the allocation) press the "Allocate" button which will cycle through the allocations the user has made inserting rows into my Transaction table - allocating the payment against multiple invoices.
The fields displayed in the outstanding invoices subform are selected in a query which calculates the amount still outstanding. In trying to illustrate my aim I've added an unbound text box to the subform (the column Allocate). What I'd like to be able to do is type a different amount against each outstanding invoice. I understand this is not the way that unbound controls work in continuous forms - i.e. that they are multiple instances of the same control hence when I type 100 against the first item in the list it appears against every item in the list. I can't use a bound control because the query is not updateable - and in any case, the entry won’t exist in the transaction table until it has been inserted anyway.
I'm pretty competent with Access and VBA but haven't really explored recordsets - I'm usually able to achieve what I want by binding my forms to stored queries. This, however, is a bit more of a complex problem than I'm used to dealing with.
So, to the point then. I guess my first question is - is it possible to achieve this? I'm sure it must be. If so please can someone try to shed some light?
Secondly, I have an idea but have absolutely no idea of how to implement it. I seems to me what I would need to do is build a temporary recordset for the form and add a field to it i.e. the "Allocate" field I've been talking about. The user would then be able to manipulate this recordset because the form wouldn't be directly accessing a query. Nor would there be any unbound controls on the form. Once the user had typed in all of the allocation figures they are happy with they would be stored in my temp recordset. They could then hit the "Allocate" button which would cycle through the recordset inserting rows into my Transaction table (as long as various validation rules were passed).
Does this sound possible? If so can anyone give me any help or point me in the direction of any material they know of that might be of any help?
Thanks in advance for your help.
To give a flavour of how I originally built this form I've attached another image - PaymentProcessingOld.gif. It's a similar kind of setup. Payments are created at the top of the screen and appear in the list box bottom left. The outstanding invoice subform serves only as a point of reference. The user actually allocates payments by selecting the item from a combo box and typing the amount. This builds the transaction I've talked about above. It's quite straight forward when there are only a few payments and allocations, but in practice payments are usually large and split across up to 100 different invoice lines. That makes it a very tedious task.
View 1 Replies
View Related
Oct 25, 2005
I have a very simple report - just one field.
I have a Form - "Cases". The button to open the report is on that form as are the values I want in the report.
I want to pull the value of Case Name and Case Number from the current form view and put them together in the single field on my report.
I can "almost" do it. Then VBA gives me a warning - it says that you can't assign a value to the control on my report.
Can anyone give me any ideas?
by the way:
I chose to make this an unbound report because I'm using SQL server as my back-end and my Access is an .adp file. SQL (so I was told by the programmers at work) can't pull in variable criteria from a form like Access Queries can. So this all has to be put in VBA.
View 5 Replies
View Related
Dec 15, 2005
How can I limit the length of an unbound control? For instance, I want a text box to only allow up to 3 characters.
View 2 Replies
View Related
Sep 17, 2013
I have an unbound text box with the following control source:
="The scores below are based on the number of total evaluations (" & Sum([TitleIDCt]) & ")."
I set the formatting of the control to Standard. It reads:
The scores below are based on the number of total evaluations (1718).
I need the comma to show up so it reads like this:
The scores below are based on the number of total evaluations (1,718).
Can this be done?
View 6 Replies
View Related
Jun 4, 2013
I have a user form that has many unbound controls that are used as calculated controls that lead up to an unbound control that is the grand total of all the data entered. I would like for the unbound grand total control to update the grand total field in the table where I would like to store the data..is there a way I can bind an unbound control to a field in a table?
View 1 Replies
View Related
Jan 26, 2008
I have entered an unbound text control into my footer, and typed in some text, and now when I go to Preview my report it's asking for a Parameter Value? There is no parameter, as it's just a return address typed in there. That's crazy!!!
View 1 Replies
View Related
May 24, 2013
On a Tab Control inside a from, I've created an Unbound Object Frame, referring to an MS Excel Work Sheet. The goal here is to link that Unbound Object Frame residing on the Tab Control and save the form/link.
Now, when I execute the code, the Object Frame is linked and updated, but when I close the form, the link inside the Object Frame is not saved! However, when I do the exact same thing without placing the Object Frame on one of the pages of the tab, so as regular control inside the form, all works fine.
The code is as follows (performed when I click the button);"OLETest" refers to the UnBound Object Frame placed inside the first page of a Tab Control inside the form.
With OLETest
.Enabled = True
.Locked = False
.Class = "Excel.Sheet.12"
[code]...
View 2 Replies
View Related
Feb 4, 2015
I am updating a value in an unbound control on an unbound form. When the value in the control is changed I want a sequence of code to execute. Specifically changing the record source of a subform and refreshing it.
The problem I have is that when the value of the unbound text box is control is changed (I am using a button to change the value as a test) the after update event on the text box does not do anything.
I did a simple test using a button to change the value in the text box and in the afterupdate event of the text box asked it to output the value of the textbox to a message box as shown below.
The problem is this does not work, nothing happens. If I tab out of the text box or change the value with the keyboard however the msgbox appears. Just not via a vba change.
Code:
Private Sub Prod_ID_AfterUpdate()
Dim pid As String
pid = Me.Prod_ID
MsgBox pid
End Sub
Private Sub Button_Test_Click()
Me.Prod_ID.SetFocus
Me.Prod_ID = "TEST"
End Sub
View 7 Replies
View Related
Nov 25, 2013
I'm preparing a query as the control source for an unbound listbox. The following code gives the desired results:
Code:
SELECT DISTINCT tblCameras.CameraNum, QrySbfShotList.CamerasFK
FROM QrySbfShotList INNER JOIN tblCameras ON QrySbfShotList.CamerasFK = tblCameras.CamerasID
WHERE (((QrySbfShotList.shootsFK)=[my].[control]))
ORDER BY QrySbfShotList.CamerasFK
(My.control will be a control on the form. For the time being, I let the query prompt me for a value.)
It produces two columns like so:
CameraNum Camera ID
1 2
2 3
3 4
4 5
5 6
6 7
8 9
11 12
CameraNum is text; CameraID is numeric.
Now, I'm trying to use a trick I read about that should add a single textual entry to the top of the list like so:
Code:
SELECT DISTINCT tblCameras.CameraNum, QrySbfShotList.CamerasFK
FROM QrySbfShotList INNER JOIN tblCameras ON QrySbfShotList.CamerasFK = tblCameras.CamerasID
WHERE (((QrySbfShotList.shootsFK)=[my].[control]))
ORDER BY QrySbfShotList.CamerasFK
union
SELECT "(ALL)", "Dummy"
FROM QrySbfShotList INNER JOIN tblCameras ON QrySbfShotList.CamerasFK = tblCameras.CamerasID
WHERE (((QrySbfShotList.shootsFK)=[my].[control]));
This produces
CameraNum Camera ID
ALL Dummy
1 2
11 12
2 3
3 4
4 5
5 6
6 7
8 9
The second (numeric) column is now out of order. This is reproducible for other values of my.control. If there are double digit entries they get inserted at the third row.
Why? What am I not understanding about how UNION works?
(BTW, I know I could put the "ALL" entry into tblCameras, thereby avoiding the need for a union, but I'd still like to know why the unexpected result.)
View 6 Replies
View Related