Syntax form moving from page-to-page (actually, Tab-toTab) in Tab Control on form?
I thought it was DoCmd.GoToPage - but that doesn't work for
Tab Controls, it seems - only for forms with page breaks in them.
Anybody know Syntax form moving from page-to-page (actually,
Tab-toTab) in Tab Control on form?
On Wed, 15 Feb 2006 06:31:38 -0500, MLH <CRCI@NorthState.net> wrote:
>I thought it was DoCmd.GoToPage - but that doesn't work for
>Tab Controls, it seems - only for forms with page breaks in them.
>Anybody know Syntax form moving from page-to-page (actually,
>Tab-toTab) in Tab Control on form?
Courtesy of Rick Brandt in another thread...
The TabControl has a Value property that corresponds to the the page
the currently selected TabPage. Setting that value brings the TabPage
index to the front. For example to switch to the 3rd TabPage...
Me.TabControlName = 2
(index starts at zero)
...copying controls from a form to a tab control
I have copied approx 20 controls from a form to a tab control for
reasons of space.
i now cannot run code triggered by the events of these controls.
for example, the following will not trigger the message box when
Private Sub cboA_Change()
MsgBox "combo A changed"
the controls are all disabled and are only enabled when the previous
control has a value set.
Instead of copying and pasting, try cutting and pasting. If you copy and
then paste, the original controls stay on the form so when you paste the new
controls get new names and not the names you chose which means that even if
you then delete the original controls, the new controls will still have new
names and therefore no events associated with them.
cboA gets copies and pasted.
Access changes the name to something like Combo294
You then delete cboA.
Your Module now has cboA_Change() but there is no control named cboA
Combo294 now exists, and looks the same, but has no events associated with.
"winshent" <email@example.com> wrote in message
> I have copied approx 20 controls from a form to a tab control for
> reasons of space.
> i now cannot run code triggered by the events of these controls.
> for example, the following will not trigger the m...Making a form control the criteria for the sql statement of another control (Access 2003)
I have two comboboxes on a form. Combobox1 uses field1 in another table
as its source of data. What I want to do is to enable combobox2 to use
field2 in that table, but only to show the rows of data that contain
the item selected in combobox1.
At the moment I can easily write a SQL statement with a WHERE clause,
but I only know how to specifiy static criteria. What I want is a
variable criteria, where the criteria is the data contained in combobox
Is this possible?
thanks for any help :)
"SteMc" <firstname.lastname@example.org> wrote
>I have two comboboxes on a form. Combobox1 uses field1 in another table
> as its source of data. What I want to do is to enable combobox2 to use
> field2 in that table, but only to show the rows of data that contain
> the item selected in combobox1.
> At the moment I can easily write a SQL statement with a WHERE clause,
> but I only know how to specifiy static criteria. What I want is a
> variable criteria, where the criteria is the data contained in combobox
In the AfterUpdate event of ComboBox1, specify the Row Source of ComboBox2
as a SELECT query. So if the first combo selects the state, then the second
combo of cities is filtered by that state:
Private Sub cboState_AfterUpdate()
Me!cboCity.RowSource = "SELECT city_id, cty_name FROM city WHERE
city_state = ' " & Me!cboState & " ' "
...Form size question with Access forms, remote desktop, and MS Surface Pro
I know this is a stretch to ask this question, but:
We have an Access 2010 application hosted using Remote Desktop. When
we access forms from the desktop they look like they should. And from
an iPad. However, a client is using their Surface Pro the forms are
so tiny that she can't use them when accessing our application "on the
cloud". Otherwise, they look fine on a Surface Pro when running it
off the cloud.
Does anyone have an idea? I do not think there is anything that the
people that are hosting our software can do.
On Monday, 29 February 2016 17:30:11 UTC, PW wrote:
> I know this is a stretch to ask this question, but:
> We have an Access 2010 application hosted using Remote Desktop. When
> we access forms from the desktop they look like they should. And from
> an iPad. However, a client is using their Surface Pro the forms are
> so tiny that she can't use them when accessing our application "on the
> cloud". Otherwise, they look fine on a Surface Pro when running it
> off the cloud.
> Does anyone have an idea? I do not think there is anything that the
> people that are hosting our software can do.
It will cost you, but have a look at a program called "ShrinkerStrether from Peter's Software (http://www.peterssoftware.com/ss.htm)
This should shrink or stretch forms and all their controls to match the scr...Open Form in Ms-Access from a hyperlink by using dhtml control
I'm having a little ms-access application problem. in form A I have a
dhtml control which I'm trying to assign it's documentHtml property a
html string. I want that the html string will contain a hyperlink which
open another form in access.
Can I do that ?
...Forms and Control Question
Can someone please tell/show me how I would do the following...
I have a table called tblOne. In tblOne I have three fields, two, three,
I have a form called frmMain. I have three blank controls on the form. I
want to assign the names from the table to the controls on the form, ex.
ctlfive displays two's data, and so on. Does that make sense to anyone?
I want to do this with VBA. The reason is that I will have other tables and
I want to use as few forms as possible so I setup up a form with many
controls and I turn off the ones that I do not need.
The ones I do need, I need to assign to the table columns.
Thanks for any help on this...
m charney at sbc global dot net
I guess you could do this through setting the record source of the form
and the control sources of the controls, although it is probably not
example of good coding.
frmMain.RecordSource = "tblOne"
frmMain.ctlFive = "fldTwo"
I can do that but with 24 fieds on tne form it can be a lot of programming.
I was wondering if there was a way to loop through and have them assign that
way. Lots less programming lines.
"Mike" <email@example.com> wrote in message
>I guess you could do this through setting the record source of the form
> and the control sources of the controls, although it is probably not
> example of good coding.
> frmMain.Rec...Form with Tab Control
I would like to have form with Tab Control with 3 pages. Each page in tab
control would contain text boxes from different sources (tables). On first
page would be text boxes from tblOne, second page from tblTwo, third page
Tables are in relationship 'One to one' (design is ok, allready checked with
people on newsgroup).
1. Is it possible to have input like this on one form?
2. When I go to another page, record from page Two are related to record in
page One. Then when clicking on page Two, I would have to pass ID to this
page. Same goes with third page. Is it possible?
Yes, you can do what you want!
Base your main form on table1 and include the ID field and one other field that
identifies the record such as CustomerName. Create a subform based on table1 and
include the ID field and all the other fields in table1 except the one you put
on the main form (CustomerName). Place the subform on the first tab page and set
the Link Master/LinkChild properties to ID. Create a subform based on table2 and
include the ID field. Place that subform on the second tab page and set the Link
Master/LinkChild properties to ID. Do the same for table3 on the third tab page.
If you set it up like this, you can choose a customer for example on the main
form and all three subforms will track to the same customer.
Your Resource For Help With Access, Excel And Word Applications
...Access 2007 Question: Is there still a 755 control limit for forms and reports?
For those of you that are using the Access 2007 Beta, can I ask, comparing
Is there still a 755 control limit for forms and reports?
...TAB Control on a Form
I am new to the TAB control so forgive this dumb question.
I have a spreadsheet that I am turning into a DB.
The sheet has about 10 different departments with employees in each
I have followed normalization rules for creating the DB so that I will
not have duplicate data in multipul tables.
On a form I have a tab control with multipul tabs labeled for each
department. I have a query that pulls ALL departments and employess as
the first tab has all employees listed.
My questions are:
1) How can I break down the data so that when I click an individual
department tab ONLY that departments information shows up?
2) Is there a way to add a password for each tab so that the different
department managers can only access the ALL tab and their own department
Thanks in advance.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"Nothing" <firstname.lastname@example.org> wrote
> I am new to the TAB control so forgive this dumb question.
There are no dumb questions, only dumb answers. I'll try not to give one.
> On a form I have a tab control with multipul tabs labeled for each
> department. I have a query that pulls ALL departments and employess as
> the first tab has all employees listed.
> My questions are:
> 1) How can I break down the data so that when I click an individual
> department tab ONLY that departments information shows up?
I ...Lock a Sub-Form from a Form control
** Any assistance you can provide would be greatly appreciated **
I have a main form with multiple sub-forms. On the main form, I have a
checkbox that corresponds with each sub-form, and this checkbox will
express the users desire to lock the ability to edit a corresponding
sub-form. To do this, I figure that each checkbox will have :
(1) the AfterUpdate property call a Macro or VB Module to execute the
setting of the Allow Edits property of the sub-form and
(2) the On Current or On Load property of each corresponding sub-form
will also check the value of the checkbox in the main form to
determine whether the Allow Edits value for this sub-form should be
Yes or No.
I have a Macro that sets the value for the sub-form and I have plugged
that into the AfterUpdate setting of the checkbox on the main form,
but I cannot find a way to insert a step before the SetValue part
which can evaluate the state of the checkbox and conditionally set the
value of the Allow Edits based on that value. I have also been playing
with the Visual Basic Code Editor my feable attempts are also failing.
Any help or insight you can provide would be helpful.
The VB code I have at the moment (but it is not compiling properly)
Private Sub Locked_AfterUpdate()
If Forms!Form1!Locked = True Then SetValue [Forms]![SubForm1]![Allow
Edits] = No
Else: SetValue [Forms]![SubForm1]![Allow Edits] = Yes
** If the form element called Locked is checked, then set the form
property Allow Edits o...MS Access 2002
MS Access 2002 - query form control returns funny symbols like 
I am running an append query on a form. Access is having trouble with
the calculated fields and comboboxes. Example – referring to
forms!FormName!ControlName within the query should return the value of
that control, correct?
I am receiving symbols such as boxes  or  as well as Chinese
symbols. Any thoughts as to why this is happening. thanks
This happens if Access does not understand the data type of the calculated
Typecast the calculated fields, and set the Format of unbound controls.
For more detail, see:
Calculated fields misinterpreted
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Dman" <Derekst@hotmail.com> wrote in message
> MS Access 2002 - query form control returns funny symbols like 
> I am running an append query on a form. Access is having trouble with
> the calculated fields and comboboxes. Example – referring to
> forms!FormName!ControlName within the query should return the value of
> that control, correct?
> I am receiving symbols such as boxes  or  as well as Chinese
> symbols. Any thoughts as to why this is happening. thanks
...Controlling order of processing controls on a form
I am using a RecordSet to assign each persons name from the RecordSet as the
ControlSource of a TextBox. There are about 50 names and about 84 controls,
so there intentionally will be blank controls.
These controls are arranged as a seating plan in a dining room.
All works OK except I cannot establish in which order the controls are
accessed in a loop:-
For Each Ctl in Me.Controls
I Assumed the sequence would be in TabIndex order, but it isn't.
Does anyone know how order they are processed in is workrd out, or more
importantly how I can force them to be processed in the required sequence?
The Control names are like
Place0101 ' TABLE No 1, Place 1
Place0102 ' TABLE No 1, Place 2
Place0103 ' TABLE No 1, Place 3
Place0327 ' TABLE No 3, Place 27
That is the order I need to assign the names
"Phil Stanton" <email@example.com> wrote in message
>I am using a RecordSet to assign each persons name from the RecordSet as
>the ControlSource of a TextBox. There are about 50 names and about 84
>controls, so there intentionally will be blank controls.
> These controls are arranged as a seating plan in a dining room.
> All works OK except I cannot establish in which order the controls are
> accessed in a loop:-
> For...MS Access 2000 VBA Code Shows Totally Incorrect Date from Controls on a Form
Sorry for my English. English is not my native tougue.
I am working in MS Access 2000 with a SQLServer 2000 Backend database.
MS Access 2000 is my GUI front end that has SQLServer linked tables in
it. One of my forms has two TEXT BOX controls formated as Short Date.
The form is binded to a linked table. The linked tables has about 7
records and one of the control is binded to a table field. These two
controls displays the date correctly as 01/07/2006 and 31/07/2006 (I am
running Windows XP, my regional setting is set to English Australia,
location is set to Australia, language for non-Unicode programs is set
to English Australia, and my date format is set to d/MM/YYYY) when the
form is running. I have some VBA code behind the form to print out
these two dates to a text file. The dates show up as 30/12/2005 and
30/01/2006. I really do not know why these dates are totally different.
Here's my VBA code:
Open "C:\Results.txt" For Output Access Write Lock Write As #1
Print #1, "GL run from "; Me.txtFromDate; " to "; Me.txtToDate
Print #1, ""
I am hoping some one has come across with this problem.
Thanks in advance,
oh, so you mean you're just outputting everything to a text file?
My guess is that since MS stores all it's data in US format, your have
to force it into Australian format when you write it to the file. What
happens if you use Format() and force it into the format you want?
T...no format assignment for a form's textbox control... Access assumes control's data is going to be placed in a finite length text field of a table
I have a form with two controls:
[Forms]![frmMainMenu]![RootTable] - combo box
[Forms]![frmMainMenu]![BodyTextHere] - text box
A button on the form tries to run this SQL when clicked...
INSERT INTO BodyMsgsSent (ToWhom, BodyText)
SELECT DISTINCTROW [Forms]![frmMainMenu]![RootTable] AS MyTargets,
[Forms]![frmMainMenu]![BodyTextHere] AS MyList;
When the SQL runs, it fails with msg saying "Field length is too
long". I don't know why, because BodyMsgsSent.BodyTextHere is a
memo-type field. If the string I type in
[Forms]![frmMainMenu]![BodyTextHere] is very short, the error does not
occur. But naturally, this control is likely to have a LOT of text in
it. It is, after all, made to hold the body text of a letter.
So, why does Access fail when trying to put the contents of this
control into a table's memo field when there are, say, 400 chars
typed into the control??? I have no way of formatting the control
to tell Access 2.0 that the control is supposed to contain VLSs
intended for storage into a memo field.
What is the bound column of the combobox? Is it's data longer than the field
it is going into?
"MLH" <CRCI@NorthState.net> wrote in message
> I have a form with two controls:
> [Forms]![frmMainMenu]![RootTable] - combo box
> [Forms]![frmMainMenu]![BodyTextHere] - text box
> A button on the form tries to run this SQL when clicked...
> I...Forms question
I'm new here and am a neophyte Access 2000 user/developer. A year
ago, I barely knew what Access was. I was asked by the people that
pay us to begin keeping certain data about the children's crisis
program I manage. After a couple of years doing this by hand on paper
(Yikes!), I decided that this was ridiculous. Out of neccessity, I
had to learn Access and develop a database to track clients and
services. So what I know, I've learned from places like this and from
the many text books I've picked up. I developed the database and
entered almost 3 years of data. We average about 30 kids and their
families a month, so there are quite a few records at this point.
Usual length of stay is about 12 days.
So, on to the question:
I have a form I've set up, frmIndivClient, that gives information on
previous clients including entry_date, exit_date and various details
of the case. That works fine. What I want is to have a form that I
can enter certain data about a particular client (Client ID, date of
birth or Last Name) and upon clicking a button (or whatever) the
form, frmIndivClient, will open to the record of that client. I've
been messing with it quite a bit and haven't come up with anything
really workable. I did put together a query that has [Client_ID #?]
in the criteria field of the Client_ID table item. open the form and
it asks for the Client_ID to open. do that and it opens to that
record. But I want to have a seperate form that there...Tab control in one of the tabs of another tab control
One of my colleagues is working with a tab control. He has several tabs. He is trying to embed another tab control inside one of the tabs of the first tab control. He had placed the second tab control inside one of the tabs of the first tab control. But the problem is that the second tab control does not show up (unless one goes to the block diagram and double clicks the second tab control, only then does it shows up; when the vi is closed and reopened its again not there). I told him that I had never seen such functionality (a tab control inside another tab control) in any application but is it somehow possible. All this is required while the VI is not running and is being developed (of course it should work at run time, but this functionality must show while the VI is not running, i.e., this functionality should be non-programmatic. Is it possible. Thanks for your time.
Hi rashid, yes it is possible. See the attached example. I see no problems with it.Hope it helps.Mike
Thanks <a href="../view_profile?user.id=88992" class="auth_text" style="font-weight: bold;" target="_blank"> MikeS81</a>! Yes you are absolutely right. Your VI is working perfectly. I wonder what has my friend done to get such behaviour as he is getting. Strange! Thanks for the help!Have a very nice day!
Hi rashid, can you upload your vi, maybe someone found the proble...Resize Form Controls and Subform Controls at the same time
In terms of resources, wondering if it makes a difference in adopting
one of the three options below for resizing controls on a form and
controls on a subform at the same time.
option a.) Put the code all in the main form and refer to the controls
on the subform in the main form's OnResize event.
option b.) Put the code for the main form controls in the main form's
OnResize event and put the code for the subform controls in the
subform's OnResize event.
option c.) Put all the code in a module and call it on the OnResize
event of the main form.
What this code is doing is positioning the controls based on the form
or subform's width:
Dim mainWid as Long, subWid as Long
mainWid = Me.InsideWidth
subWid = Me.Child.Form.InsideWidth
Me.ControlName.Left = mainWid - 500
Me.Child.Form.ControlName.Left = subWid - 200
Just wondering what advice people have to offer on this.
...How to Automatically Resize Form Controls When Resizing a Form
I am an experienced developer with other languages and applications, but a
neophyte when it comes to MS Access forms. Can someone please help get me
with a solution for the following issue: On a form, I have an object
(ImgEdit control from MS Imaging) that needs to automatically grow and
shrink when a user resizes the form. The object *does not* need to grow and
shrink based on the size of the image that is being displayed. Rather the
object needs to grow and shrink so that it occupies the maximum possible
screen real estate as the size of the form window is adjusted by the user.
Please note that there are also other controls on the form, all to the left
side of the ImgEdit object if it matters.
In some other languages that I have used, there are various ways of
"attaching" an edge of one object to the edge of another object, so that the
size of one object automatically adjusts based on the size of the other
object, and that is essentially the same functionality that I need here. I
feel certain that there must be some reasonably easy way to do this, and
could swear that I have seen this capability utilized in MS Access forms
developed by others. But I can't figure out how this is being done, and
can't seem to locate any relevant docs. Can someone please help me see the
I think Peter de Baets' Resizer might help you
"Kevin Myers" <KevinMyers@austin...Accessing form control elements
Assuming you have a typical form built in this manner:
<p><input id="idInputText" name="nameInputText" type="text" size="20"></p>
<p><input id="idCheckbox" name="nameCheckbox">optional</p>
<p><input id="idRadio1" name="nameRadio">yes<input id="idRadio2"
<p><select id="idSelect" name="nameSelect"><option
value="a">a</option&...TAB CONTROL to load a FORM
I'm starting a new project. A Personnel System. I have considered
opening a single bound form to the main employee table. The user can
scroll the records to any individual. I would like to have a tab
control at the top of the form which would allow the user to select
(PERSONAL), (TRAINING),(DISIPLINARY),and (SICKLEAVE) Tabs. Each Tab
should open a FORM and display the relavant TABLE of records tied to
the Employee being viewed in the MainForm.
How do I get the Tab selected to load a (Form or SubForm Control) and
Can I, or should I close the Form/Table when leaving the selected Tab?
OR ... Should I just open multiple tables at startup, and make the
relevant fields available
in each Tab Page ?
<ApexData@gmail.com> wrote in message
> I'm starting a new project. A Personnel System. I have considered
> opening a single bound form to the main employee table. The user can
> scroll the records to any individual. I would like to have a tab
> control at the top of the form which would allow the user to select
> (PERSONAL), (TRAINING),(DISIPLINARY),and (SICKLEAVE) Tabs. Each Tab
> should open a FORM and display the relavant TABLE of records tied to
> the Employee being viewed in the MainForm.
> How do I get the Tab selected to load a (Form or SubForm Control) and
> it's Table?
> Can I, or should I close the Form/Table when leaving the ...How to Tab to controls on the form footer?
I have a form with buttons (Ok, Close etc) on the form footer.
As the user tabs through the form controls focus will not move to the footer
Am I missing something here?
Do I have to trap the Tab key on the last control (keydown, keypress) in the
tab order and move focus to the first control in the footer.
NG Brown & Associates P/L
31 Jellico Dr Scoresby AUSTRALIA 3179
Ph 03 9753 4499
Fax 03 9753 4299
On Wed, 17 Sep 2003 02:56:13 GMT in comp.databases.ms-access, "Paul
Copeland" <firstname.lastname@example.org> wrote:
>I have a form with buttons (Ok, Close etc) on the form footer.
>As the user tabs through the form controls focus will not move to the footer
>Am I missing something here?
>Do I have to trap the Tab key on the last control (keydown, keypress) in the
>tab order and move focus to the first control in the footer.
Before the form's "Cycle" property, what we used to do to avoid
tabbing to the next record was have a transparent button on the end
that would set focus to the previous control in it's OnEnter event,
you could use the same trick to set focus to one of the footer
A)bort, R)etry, I)nfluence with large hammer.
(replace sithlord with trevor for email)
That seems to work.
Thanks for the help.
"Trevor Best" <bouncer@localhost> wrote in message
news:i03gmvc2umo60h3d158q7alo...Adding forms on tab control
I have a form which contains basics of a customer's order from table
I placed a tab control on this form which is still empty. I'm trying
to design a project management database and would like to enter one
form for each sub project on each tab page.
[Financial] [Survey] [Framing] [Siding] [Windows] [Roofing] ...=>
I have all the sub project forms designed. Each time I try to enter
one of them onto a tab page, they don't work. I have tried to copy and
paste the fields but then don't know how to hook them up to their
source data(table or query). Is it possible to do this and then
somehow point them to a source table or query? Could someone either
give me specifics on how to do this or where to go for specifics?
I have tried inserting them as sub forms, but then they display in
datasheet format. I need to these sub project pages to look like the
individual form I designed.
Under what circumstances is it best to use tables instead of queries
as a data sources for forms. My application will have only about 300
orders per year. Each sub project has an average of 45 fields.
> I have a form which contains basics of a customer's order from table
> I placed a tab control on this form which is still empty. I'm trying
> to design a project management database and would like to enter one
> form for each sub project on each tab page.
> [Financial] [Survey...Flickering Tab control form
When I display the form, the screen flickers, the hourglass flickers
on and off, and the taskbar displays 'Calculating'.
The form is quite complex with nine tabs and seven subforms. but the
problem only occurs in certain records.
I have tried other suggestions suggested by the group, ie installing
Service pack 3; and changing unattached labels to text boxes, both
Sounds like you have triggered an endless loop here, so the form is
constantly recalculating or requerying the data.
If you are using Conditional Formatting on any controls, you might try
temporarily removing it to see if it helps. This is particularly a problem
for controls with a calculated expression in the Control Source, and the
issue is worse in Access 2000.
If that's not the case, see if you can track down anything in the events
that could trigger an endless loop. For example, if the subform's Current
event requeries the main form (or recalculates it), the main form might
respond by reloading the data for the subform to ensure it is up to date
with the new data. Naturally, when the record is loaded into the subform,
its Current event is triggered, and that code affects the main form again,
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"colin spalding" <email@example.com> wrote in message
news:1fc441b...Open Access Database Form from within Access database
I have included the following code to open an Access database form from
within an exsisting Access database. But when I run the code, it
appears that it opens the database because in windows explorer I can see
the database has the .ldb file extension. So it appears that it's open,
but I can't see the database or the form that I've tried to open. What
am I doing wrong. The following is the code:
'This is in the declaration part of the module
Dim appAccess As Access.Application
' Initialize string to database path.
Const strConPathToSamples = "C:\Documents and Settings\My
Documents\Careset Data Verification\Error Log Database.mdb"
strDB = strConPathToSamples & "Error Log Database.mdb"
' Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Application")
' Open database in Microsoft Access window.
' Open form.
appAccess.DoCmd.OpenForm "Import Error Logs", acNormal
Thanks in advanced,
Posted via http://dbforums.com
After these lines of code:
' Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Application")
' Open database in Microsoft Access window.
'-->you need to place this line of code
appAccess.Visible = True '<--missing this line here
*** Sent via Develop...