Well to me usin VBA on any field is a problem :)
Out of curiosity, wonder how come that you don't work with Access2007? As I see many of more experience users use 2003 version. Is there any particular reeason?
User Profile
Collapse
-
display control = combo box
allow multiple values = yes
This are field properties in table design view!
MS 2007...Leave a comment:
-
First of all thanks again for helping me. I'll take a look on your suggested link as soon as I find time.
I believe that we misunderstood each other. I'm not talking about accessing the various different columns of a ComboBox control. It's about ComboBox field with "Allow Multiple Values" option set to yes.
Anyway, i did find a solution, I have modify code to:
...Code:DoCmd.OpenForm "Kontakti",
Leave a comment:
-
docmd.open expresion with multivalues field
Hi,
I'm having difficulty with following code in dblclick event:
This expression is working only for singlevalued columns, does someone know how to do it with multivalued column? Is it even possible?Code:DoCmd.OpenForm "Kontakti", , , "ContactID = " & Me.cbo_AssignedFrom, , acDialog
-
of course...
on click event:
on load event:Code:DoCmd.OpenForm "Poslovi - Detalji", , , , , acDialog, CStr(Me.cbo_PosloviID)
...Code:Dim PosloviID As String If IsNull(Me.OpenArgs) Then PosloviID = "0" Else PosloviID = Me.OpenArgs End If If gbl_GrupaIDLeave a comment:
-
Never mind than, I'll use datasheet view! Only that way I can not have header of form....Leave a comment:
-
Access built-in filter in continuous form
I'm having problem with filtering in continuous form. I'm using only default (built-in) Access filter option and in Continuous form view there is no "triangle" option on the right side of the labels like in Datasheet view. Is there a simple way how to add that option?
Here is a screenshot!... -
I really want it to do this my self but is hard without any previous knowledge to understand everything, so finally my friend helped me with this. He add the CStr function in the DoCmd.OpenForm method and with some changes in Onload code its working. Now it's look very simple...but...
Anyway thank you for helping!...Leave a comment:
-
Check this post, I think you can find answer there...
http://bytes.com/topic/access/answer...ons-can-posted...Leave a comment:
-
But that way how can I change record source depend on user? I have global variable which recognize every user and all users should be able to open form with different record source. See code: (this time without editing :) )
...Code:Private Sub Form_Load() If gbl_GrupaID = 2 Then 'Grafika cbo_AssignedTo.Enabled = False Command_AssignedTo.Visible = True cboGoToContact.RowSourceLeave a comment:
-
Sorry for the misunderstandin g
I tried to find solution but in vain. All I find out is that when on load event you specify Form.RecordSour ce the value of TaskID for whatever reason become empty.
I have even try to make a new simple database with one table (TaskID, Task name) and two forms. In first form (Task1) I add on load event code:
...Code:Private Sub Form_Load() Form.RecordSource = "SELECTLeave a comment:
-
I really appreciate your help and I didn't want from you to write a code instead of me. All I didn't know what the "Check the Err object" means so I ask for example (some times better way of explanation).
One way or another your solution was helpfull. Code below is working for me...hope that this is what you sugesst!
...Code:"On Error GoTo Close_Click_Err" ...code... Close_Click_Exit:
Leave a comment:
-
The cancel option is working. It stops closing and there is no questions from before update code!?
I'm newbie about vba, and most of codes I find (learn) surfing the net... could you give me an example of code for this solution?...Leave a comment:
-
Thanks for reply! I was away this days, so sorry it took so long to answer.
That was my spelling mistake, there is no comma before the where clause. Do you have any other suggestion?Leave a comment:
-
Form closes before errors or notifications can be posted
On close command I have code which ask me if I want to save changes before closing (yes, no, cancel).
...Code:Private Sub Close_Click() bSaving = True If Me.Dirty Then answer = MsgBox("Do you want to save changes before closing?", vbYesNoCancel + vbQuestion, "Confirm Save") If answer = vbNo Then Me.Undo DoCmd.Close acForm, Me.Name -
Docmd.openform Problem
Hi!
On load event of "tasks" form I have code
gbl_GrupID is the global variable which holds the Current Group and gbl_ContaktID is the global variable which holds the Current User...Code:If gbl_GrupID = 2 Then cbo_AssignedTo.Enabled = False Form.RecordSource = "SELECT Tasks.* FROM Tasks, WHERE AssignedTo = " & gbl_ContaktID & ";" End If End Sub
-
Nice and clear... the problem is solved!
I'm newbie with VBA but this was very simple even for me!
Instead of private, I add public variable, because I have multiple forms with "save", "save and new" and "close" button and everything is working just fine!
Thx TheSmileyOne :)Leave a comment:
-
Remove validation from save process
Hello, everyone!
I add a "Yes" "No" "Cancel" option on the before update event of the form.
...Code:Private Sub Form_BeforeUpdate(Cancel As Integer) answer = MsgBox("Do you want to save changes?", vbYesNoCancel + vbQuestion, "Confirm Save") If answer = vbNo Then Me.Undo ElseIf answer = vbCancel Then
No activity results to display
Show More
Leave a comment: