mohammadagul
PrinceAtif
- Local time
- Today, 22:52
- Joined
- Mar 14, 2004
- Messages
- 298
Hello and Hi,
A couple of Days Back i had Asked a Question about changing the default value of field in a table from a form. I was granted with the following answer and Code
Dim i As Variant
Dim j As Variant
For i = 0 To CurrentDb.TableDefs.Count - 1
For j = 0 To CurrentDb.TableDefs(i).Fields.Count - 1
If CurrentDb.TableDefs(i).Name = "tblInvoices" And _
CurrentDb.TableDefs(i).Fields(j).Name = "Invoice" Then
MsgBox "Please Wait, Changes Are Being Made.", vbInformation, "Defining Invoice."
CurrentDb.TableDefs(i).Fields(j).DefaultValue = True
MsgBox "Congratulation!Changes Made Successfully", vbOKOnly, "Congratulation"
End If
Next j
Next i
now Presently i am trying to set the Input mask through this code. but it doesnt accepts the Input Mask Criteria. What i want i that i could choose a number of input Masks from a Field in a Form and then press the button to make that Input Mask as the Defalut data entry Mask for all my form.
Can it be done? If yes please provide me with some clue to do it
A couple of Days Back i had Asked a Question about changing the default value of field in a table from a form. I was granted with the following answer and Code
Dim i As Variant
Dim j As Variant
For i = 0 To CurrentDb.TableDefs.Count - 1
For j = 0 To CurrentDb.TableDefs(i).Fields.Count - 1
If CurrentDb.TableDefs(i).Name = "tblInvoices" And _
CurrentDb.TableDefs(i).Fields(j).Name = "Invoice" Then
MsgBox "Please Wait, Changes Are Being Made.", vbInformation, "Defining Invoice."
CurrentDb.TableDefs(i).Fields(j).DefaultValue = True
MsgBox "Congratulation!Changes Made Successfully", vbOKOnly, "Congratulation"
End If
Next j
Next i
now Presently i am trying to set the Input mask through this code. but it doesnt accepts the Input Mask Criteria. What i want i that i could choose a number of input Masks from a Field in a Form and then press the button to make that Input Mask as the Defalut data entry Mask for all my form.
Can it be done? If yes please provide me with some clue to do it