 | 
28-Jul-2006, 08:17 AM
|  | Guest | | | | | | | | | | go to a field in a form I have vials that are kept in boxes. In the table vials, every vial is a
record. for every vial there is a field with the number of the box, another
for the column(represented by letters) and another for the row(1, 2, 3) and Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10953-go-to-a-field-in-form.html
the key is the vialID. I want to have a table that represents the boxes. Each
record will be a box, and the fileds will be the positions in the box: a1,
a2, a3, a4, b1, b2, b3. since each box has 10 columns and 10 rows, every Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10953
record has 100 fields. If vial 223 is in box 2, column a, row 2, I want to go
to the form boxes, record number 2, field a2 and write there 223. I managed
to use the goto command in a macro to go to the field a2 and the filed get
focus. but I don't know how to write 223 automatically (so the user don't
have to write it. I would appreciate some help, without the need to write in
visual basic, since I don't know it. Many thanks Do you agree or disagree with the writer above? Why not share your immediate thoughts with us! Login Now! or Sign Up Today! to share your views... Gurfateh! | 
28-Jul-2006, 08:17 AM
|  | Guest | | | | | | | | | | RE: go to a field in a form You could use the "setvalue" macro - place it on the line "below" the GoTo
line on the same macro
Or - creat a form based on your Vial Table and insert a "find Combo"
[FinVial]. Set the small bit of code to Go To the Vial you select in the
combo drop down and then set the text in the [VialName] to whatever you want.
Set the code to run on the AfterUpdate option (and place me.FindVial = "" )
to clear the combo ready for the next search.
Try something like this - "I have not had time to check" this but if you
want to go ahead with the form let me know and I will look at it.
Private Sub FindVial_AfterUpdate()
On Error GoTo VialName_AfterUpdate_Err
DoCmd.GoToControl "VialName" Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10953
Forms!frmFormName!VialName = "WhatEver"
CDStreet_AfterUpdate_Exit:
Exit Sub
End Sub
--
Wayne
Manchester, England.
"Izabella" wrote:
> I have vials that are kept in boxes. In the table vials, every vial is a
> record. for every vial there is a field with the number of the box, another
> for the column(represented by letters) and another for the row(1, 2, 3) and
> the key is the vialID. I want to have a table that represents the boxes. Each
> record will be a box, and the fileds will be the positions in the box: a1,
> a2, a3, a4, b1, b2, b3. since each box has 10 columns and 10 rows, every
> record has 100 fields. If vial 223 is in box 2, column a, row 2, I want to go Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10953
> to the form boxes, record number 2, field a2 and write there 223. I managed
> to use the goto command in a macro to go to the field a2 and the filed get
> focus. but I don't know how to write 223 automatically (so the user don't
> have to write it. I would appreciate some help, without the need to write in
> visual basic, since I don't know it. Many thanks | 
28-Jul-2006, 08:17 AM
|  | Guest | | | | | | | | | | Re: go to a field in a form On Wed, 7 Jun 2006 00:30:01 -0700, Izabella wrote:
>I have vials that are kept in boxes. In the table vials, every vial is a
>record. for every vial there is a field with the number of the box, another
>for the column(represented by letters) and another for the row(1, 2, 3) and
>the key is the vialID. I want to have a table that represents the boxes. Each
>record will be a box, and the fileds will be the positions in the box: a1,
>a2, a3, a4, b1, b2, b3. since each box has 10 columns and 10 rows, every
>record has 100 fields. If vial 223 is in box 2, column a, row 2, I want to go
>to the form boxes, record number 2, field a2 and write there 223. I managed
>to use the goto command in a macro to go to the field a2 and the filed get
>focus. but I don't know how to write 223 automatically (so the user don't
>have to write it. I would appreciate some help, without the need to write in
>visual basic, since I don't know it. Many thanks
I'd REALLY suggest that you reconsider this table design. Storing data Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10953
- the vial position - in a fieldname is simply BAD DESIGN. Suppose you
go to new boxes with 144 positions? What do you do - redesign your Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10953
table, all your queries, all your forms?
I'd suggest two separate fields for the row and the column. Three
fields together - BoxID, RowNum, ColNum - will together uniquely find
a vial. Each vial should be in its own record in a table related
one-to-many to the box table.
John W. Vinson[MVP] | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |