Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you add to the field list?

Status
Not open for further replies.
Nov 13, 2007
2
US
I've been trying to add a few boxes to my 'Work Orders by Customer' table. Is this possible?
 
This is the code I tried to create a new Control Source for an Alt Phone input....

Code:
Option Compare Database

Sub CreateNewRegSettingsFromTable()
Beg

    Dim dbLocal As Database
    Dim tblDefaults As Recordset
    Dim strAltPhone As String
    Dim strSetting As String

    On Error GoTo Err_CreateNew

    Set dbLocal = CurrentDb()
    Set tblDefaults = dbLocal.OpenRecordset("tblDefaultSettings")

    ' - - Get the application title to use as a key
    strAltPhone = dbLocal.Properties("AltPhone")

    ' - - Create settings for those defaults where there is no entry
    With tblDefaults

        Do Until .EOF
    
        StstrSetting = GetSetting(AltPhone:=strAltPhone, _
                    Section:="Settings", Key:=!SettingTitle)
                
        If Len(strSetting) = 0 Then

            SaveSetting AltPhone:=strAltPhone, Section:="Settings", _
                            Key:=!SettingTitle, Setting:=!DefaultValue
                    
            End If

            .MoveNext

        Loop

    End With

Exit_CreateNew:

    Exit Sub
    
Err_CreteNew:
    
      MsgBox Err.Description
      Resume Exit_CreateNew
Owner ChrisTucker
Save

End Sub


 

You make no mention of doing this by code, so why not simply go into Design View for the table and add them?

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top