Hi all,
Am jus a lil new to accessing QC thro VBA. I am unable to add a defect thro my VBA code in XL. My code is :

Dim bugF As BugFactory
Dim bg As bug

' Get the factory object
Set bugF = tdc.BugFactory
'MsgBox tdc.ProjectsList, vbOKCancel

Set bg = bugF.Item(5)

'Debug.Print bg.Priority
'Debug.Print bg.Project

'Setting values for defect
Set bg = bugF.AddItem(Null)
bg.Summary = s_defSummary
bg.DetectedBy = s_qcUser
bg.Field("BG_DETECTION_DATE") = Date
'bg.Field("BG_DEFECT_TYPE") = s_defType
bg.Status = s_defStatus
bg.Project = "Target/Common" 'tdc.ProjectName
bg.Field("BG_SEVERITY") = s_defSeverity
'bg.Priority = "01" 's_defSeverity
'bg.Field("BG_SOURCE") = s_defSource
'bg.Field("BG_WHERE_FOUND") = s_defWhereFound

When I view the "Project" value using Item(5), it says "Target/Common". So when I set the same value and create a bug, it says Project value cannot be empty or space. Where am I wrong and how do I find the value of Project. Is nt it tdc.ProjectName ???

Also is there any access restriction problem here, but am able to add defects using the same login ID???

One more thing, how do I know what are the mandatory fields before adding a defect ???

Can anybody help me???

Thanks in advance.