Ms Access: open form from specific ComboBox value

By dejan.dejanovic ·

I`m looking for help, for microsoft access. I have a ComboBox with two values Shipper and Receiver. I would like to do next: when choose shipper after that open Form

I was looking for solution in entire Network, but could not found it...

thank you to anyone for help in advance...

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Use lost focus event

by Slayer_ In reply to Ms Access: open form from ...

I will guess as to your form names

In the shipper combobox lost focus event.

Write something like

if combobox.value <> "" then
end if

If you wish to display a loading message or screen for long queries, you can do something like this.

if combobox.value <> "" then
call load(formloading) 'load the loading message into memory
formloading.visible=true 'display it passively
call formloading.refresh 'refresh it to trigger a repaint, in the function "repaint" does the same thing
call load(form) 'Load the primary form into memory, any long queries in the load/initialize events will be done here
formloading.visible=false 'after loading, hide the loading window
call unload(formloading) '...and unload it
set formloading = nothing 'free up memory
call 'show our newly loaded window
end if

Substitute form, formloading, and combobox for the proper names of your controls.

Also I suggest buying yourself a VB or VBA textbook, or learning to use google, as this sort of thing would be taught in an intro to VB course.

Collapse -

What about this solution, Option Group

by dejan.dejanovic In reply to Use lost focus event

First thanks for help SinisterSlay. Second, yes I would like to learn VB language. But, I just can not to realize the concept of language...

I have found easy solution with Option Group, with Wizards:
1.Put labels name?
I have put next names...
2. Choose default value?
I have choose Shipper

3.What value do you want to assign to each option?
By default values are 1,2,...

4.What do you want to do with the value of a selected option?
I have choose one of my field.
BUT, I want to show me a different values. I would like to show me a value same like option names. Shipper and Receiver.

How can I convert values 1 and 2 into Shipper and Receiver???

Collapse -

Change the propertise

by Slayer_ In reply to What about this solution, ...

Look for the "List" property

Normally anyways, I don't know what that Wizard did...

Related Discussions

Related Forums